Add some more lints, and fix the compile errors they generate

This commit is contained in:
Paul Woolcock
2018-08-28 06:14:56 -04:00
parent 4e5a2f5c51
commit 5b24922d9e
10 changed files with 24 additions and 10 deletions
+1
View File
@@ -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>,
+1 -1
View File
@@ -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,
+1
View File
@@ -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
View File
@@ -1,3 +1,4 @@
#[derive(Debug, Clone)]
pub struct Mention {
/// URL of user's profile (can be remote)
pub url: String,
+1 -1
View File
@@ -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 {
+2 -5
View File
@@ -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,
}