chore (backend-rs): address cargo doc
warnings
This commit is contained in:
parent
7a3aec1881
commit
9c60e8ff8b
3 changed files with 6 additions and 6 deletions
|
@ -15,9 +15,9 @@ pub const USER_ACTIVE_THRESHOLD: i32 = 3 * DAY;
|
|||
/// List of file types allowed to be viewed directly in the browser
|
||||
/// Anything not included here will be responded as application/octet-stream
|
||||
/// SVG is not allowed because it generates XSS <- we need to fix this and later allow it to be viewed directly
|
||||
/// https://github.com/sindresorhus/file-type/blob/main/supported.js
|
||||
/// https://github.com/sindresorhus/file-type/blob/main/core.js
|
||||
/// https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers
|
||||
/// <https://github.com/sindresorhus/file-type/blob/main/supported.js>
|
||||
/// <https://github.com/sindresorhus/file-type/blob/main/core.js>
|
||||
/// <https://developer.mozilla.org/en-US/docs/Web/Media/Formats/Containers>
|
||||
#[crate::export]
|
||||
pub const FILE_TYPE_BROWSERSAFE: [&str; 41] = [
|
||||
// Images
|
||||
|
|
|
@ -5,7 +5,7 @@ use std::collections::HashMap;
|
|||
// - #[serde(skip_serializing_if = "Option::is_none")] (https://github.com/3Hren/msgpack-rust/issues/86)
|
||||
// - #[serde(tag = "version", rename = "2.1")] (https://github.com/3Hren/msgpack-rust/issues/318)
|
||||
|
||||
/// NodeInfo schema version 2.1. https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.1
|
||||
/// NodeInfo schema version 2.1. <https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.1>
|
||||
#[derive(Deserialize, Serialize, Debug, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
pub struct Nodeinfo21 {
|
||||
|
@ -25,7 +25,7 @@ pub struct Nodeinfo21 {
|
|||
pub metadata: HashMap<String, serde_json::Value>,
|
||||
}
|
||||
|
||||
/// NodeInfo schema version 2.0. https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.0
|
||||
/// NodeInfo schema version 2.0. <https://nodeinfo.diaspora.software/docson/index.html#/ns/schema/2.0>
|
||||
#[derive(Deserialize, Serialize, Debug, PartialEq)]
|
||||
#[serde(rename_all = "camelCase")]
|
||||
#[crate::export(object, js_name = "Nodeinfo")]
|
||||
|
|
|
@ -66,7 +66,7 @@ pub fn get_timestamp(id: &str) -> Result<i64, InvalidIdError> {
|
|||
/// With the length of 16, namely 8 for cuid2, roughly 1427399 IDs are needed
|
||||
/// in the same millisecond to reach 50% chance of collision.
|
||||
///
|
||||
/// Ref: https://github.com/paralleldrive/cuid2#parameterized-length
|
||||
/// Ref: <https://github.com/paralleldrive/cuid2#parameterized-length>
|
||||
#[crate::export]
|
||||
pub fn gen_id() -> String {
|
||||
create_id(&Utc::now().naive_utc())
|
||||
|
|
Loading…
Reference in a new issue