forked from MightyPork/elefren-fork
Add some more lints, and fix the compile errors they generate
This commit is contained in:
@@ -82,6 +82,7 @@ fn string_or_bool<'de, D: Deserializer<'de>>(val: D) -> ::std::result::Result<bo
|
||||
})
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct CredentialsBuilder<'a> {
|
||||
display_name: Option<&'a str>,
|
||||
note: Option<&'a str>,
|
||||
|
||||
@@ -37,7 +37,7 @@ pub struct StreamingApi {
|
||||
}
|
||||
|
||||
/// Statistics about the Mastodon instance.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[derive(Debug, Clone, Copy, Deserialize)]
|
||||
pub struct Stats {
|
||||
user_count: u64,
|
||||
status_count: u64,
|
||||
|
||||
@@ -24,6 +24,7 @@ use serde::Deserialize;
|
||||
/// # Ok(())
|
||||
/// # }
|
||||
/// ```
|
||||
#[derive(Debug, Clone)]
|
||||
pub(crate) struct ItemsIter<'a, T: Clone + for<'de> Deserialize<'de>, H: 'a + HttpSend> {
|
||||
page: Page<'a, T, H>,
|
||||
buffer: Vec<T>,
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
#[derive(Debug, Clone)]
|
||||
pub struct Mention {
|
||||
/// URL of user's profile (can be remote)
|
||||
pub url: String,
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ pub mod search_result;
|
||||
pub mod status;
|
||||
|
||||
/// An empty JSON object.
|
||||
#[derive(Deserialize)]
|
||||
#[derive(Deserialize, Debug, Copy, Clone, PartialEq)]
|
||||
pub struct Empty {}
|
||||
|
||||
pub mod prelude {
|
||||
|
||||
@@ -20,18 +20,15 @@ pub struct Notification {
|
||||
}
|
||||
|
||||
/// The type of notification.
|
||||
#[derive(Debug, Clone, Deserialize)]
|
||||
#[derive(Debug, Clone, Copy, Deserialize)]
|
||||
#[serde(rename_all = "lowercase")]
|
||||
pub enum NotificationType {
|
||||
/// Someone mentioned the application client in another status.
|
||||
#[serde(rename = "mention")]
|
||||
Mention,
|
||||
/// Someone reblogged one of the application client's statuses.
|
||||
#[serde(rename = "reblog")]
|
||||
Reblog,
|
||||
/// Someone favourited one of the application client's statuses.
|
||||
#[serde(rename = "favourite")]
|
||||
Favourite,
|
||||
/// Someone followed the application client.
|
||||
#[serde(rename = "follow")]
|
||||
Follow,
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user