mirror of
https://github.com/LemmyNet/lemmy.git
synced 2024-11-22 20:31:19 +00:00
Run cargo fmt
This commit is contained in:
parent
87a2af4b5d
commit
8d1b589d42
2 changed files with 129 additions and 11 deletions
|
@ -53,7 +53,18 @@ use strum::{Display, EnumString, IntoStaticStr};
|
||||||
use ts_rs::TS;
|
use ts_rs::TS;
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, IntoStaticStr, Display, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default, Hash,
|
EnumString,
|
||||||
|
IntoStaticStr,
|
||||||
|
Display,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Default,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -87,7 +98,19 @@ pub enum SortType {
|
||||||
Scaled,
|
Scaled,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(
|
||||||
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
/// The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
|
/// The comment sort types. See here for descriptions: https://join-lemmy.org/docs/en/users/03-votes-and-ranking.html
|
||||||
|
@ -100,7 +123,18 @@ pub enum CommentSortType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default, Hash,
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Default,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -123,7 +157,18 @@ pub enum ListingType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default, Hash,
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Default,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -144,7 +189,18 @@ pub enum RegistrationMode {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Default, Clone, Copy, PartialEq, Eq, Hash,
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Default,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
@ -164,7 +220,19 @@ pub enum PostListingMode {
|
||||||
SmallCard,
|
SmallCard,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(
|
||||||
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
/// The type of content returned from a search.
|
/// The type of content returned from a search.
|
||||||
|
@ -177,7 +245,19 @@ pub enum SearchType {
|
||||||
Url,
|
Url,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, IntoStaticStr, Debug, PartialEq, Eq, Serialize, Deserialize, Clone, Copy, Hash)]
|
#[derive(
|
||||||
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Hash,
|
||||||
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
/// A type / status for a community subscribe.
|
/// A type / status for a community subscribe.
|
||||||
|
@ -187,7 +267,19 @@ pub enum SubscribedType {
|
||||||
Pending,
|
Pending,
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Hash)]
|
#[derive(
|
||||||
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
/// A list of possible types for the various modlog actions.
|
/// A list of possible types for the various modlog actions.
|
||||||
|
@ -211,7 +303,18 @@ pub enum ModlogActionType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, Default, PartialEq, Eq, Hash,
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
Default,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(TS))]
|
#[cfg_attr(feature = "full", derive(TS))]
|
||||||
#[cfg_attr(feature = "full", ts(export))]
|
#[cfg_attr(feature = "full", ts(export))]
|
||||||
|
@ -225,7 +328,18 @@ pub enum PostFeatureType {
|
||||||
}
|
}
|
||||||
|
|
||||||
#[derive(
|
#[derive(
|
||||||
EnumString, Display, IntoStaticStr, Debug, Serialize, Deserialize, Clone, Copy, PartialEq, Eq, Default, Hash,
|
EnumString,
|
||||||
|
Display,
|
||||||
|
IntoStaticStr,
|
||||||
|
Debug,
|
||||||
|
Serialize,
|
||||||
|
Deserialize,
|
||||||
|
Clone,
|
||||||
|
Copy,
|
||||||
|
PartialEq,
|
||||||
|
Eq,
|
||||||
|
Default,
|
||||||
|
Hash,
|
||||||
)]
|
)]
|
||||||
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
#[cfg_attr(feature = "full", derive(DbEnum, TS))]
|
||||||
#[cfg_attr(
|
#[cfg_attr(
|
||||||
|
|
|
@ -172,7 +172,11 @@ async fn get_feed_data(
|
||||||
|
|
||||||
let mut channel = Channel {
|
let mut channel = Channel {
|
||||||
namespaces: RSS_NAMESPACE.clone(),
|
namespaces: RSS_NAMESPACE.clone(),
|
||||||
title: format!("{} - {}", site_view.site.name, Into::<&'static str>::into(listing_type)),
|
title: format!(
|
||||||
|
"{} - {}",
|
||||||
|
site_view.site.name,
|
||||||
|
Into::<&'static str>::into(listing_type)
|
||||||
|
),
|
||||||
link: context.settings().get_protocol_and_hostname(),
|
link: context.settings().get_protocol_and_hostname(),
|
||||||
items,
|
items,
|
||||||
..Default::default()
|
..Default::default()
|
||||||
|
|
Loading…
Reference in a new issue