diff --git a/Cargo.toml b/Cargo.toml index 47b9a01..5a0135c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "libjens" -version = "1.0.0" +version = "1.0.1" authors = ["LordMZTE "] edition = "2018" diff --git a/rustfmt.toml b/rustfmt.toml new file mode 100644 index 0000000..1059111 --- /dev/null +++ b/rustfmt.toml @@ -0,0 +1,12 @@ +unstable_features = true +binop_separator = "Back" +format_code_in_doc_comments = true +format_macro_matchers = true +format_strings = true +imports_layout = "HorizontalVertical" +match_block_trailing_comma = true +merge_imports = true +normalize_comments = true +use_field_init_shorthand = true +use_try_shorthand = true +wrap_comments = true diff --git a/src/api.rs b/src/api.rs index 5ff7d4e..184948a 100644 --- a/src/api.rs +++ b/src/api.rs @@ -1,6 +1,7 @@ use serde::{ de::{self, Visitor}, - Deserialize, Deserializer, + Deserialize, + Deserializer, }; use thiserror::Error; @@ -64,7 +65,7 @@ pub struct User { pub id: Option, pub tokenhash: Option, pub userdir: Option, - pub dayuploads: String, + pub dayuploads: u16, } impl User { diff --git a/src/client.rs b/src/client.rs index 2634648..c4c0dea 100644 --- a/src/client.rs +++ b/src/client.rs @@ -22,7 +22,7 @@ macro_rules! init_cache { None => { let x = Arc::new($init_fn); cell.get_or_init(|| x) - } + }, }) }}; } @@ -36,7 +36,8 @@ impl JMClient { JMClientBuilder::default() } - /// clears the cache. all requests will be made again after this has been called. + /// clears the cache. all requests will be made again after this has been + /// called. pub async fn clear_cache(&mut self) { self.cache.lock().await.clear(); }