change dayuploads to int & bump version

This commit is contained in:
LordMZTE 2021-12-26 12:55:17 +01:00
parent f2f48a6243
commit 4f2449f2a1
4 changed files with 19 additions and 5 deletions

View File

@ -1,6 +1,6 @@
[package]
name = "libjens"
version = "1.0.0"
version = "1.0.1"
authors = ["LordMZTE <lord@mzte.de>"]
edition = "2018"

12
rustfmt.toml Normal file
View File

@ -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

View File

@ -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<String>,
pub tokenhash: Option<String>,
pub userdir: Option<String>,
pub dayuploads: String,
pub dayuploads: u16,
}
impl User {

View File

@ -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();
}