chore: change verbose to isize, only println if verbose > 0 (env WEB_SERVER_VERBOSE)
This commit is contained in:
parent
b5685bbe40
commit
ad0664c90b
5 changed files with 26 additions and 18 deletions
|
|
@ -34,8 +34,10 @@ pub struct KloudStore<T> {
|
|||
// impl<T: Clone> KloudStore<T> { fn into(s: T) -> T { s.clone() } }
|
||||
|
||||
impl<T> KloudStore<T> {
|
||||
pub fn new(data: BTreeMap<String,T>, coll_key: String, data_ctx: DataContext) -> Self {
|
||||
println!("Loading {} {} items",&coll_key,data.len());
|
||||
pub fn new(data: BTreeMap<String,T>, coll_key: String, data_ctx: DataContext,verbose: isize) -> Self {
|
||||
if verbose > 0 {
|
||||
println!("Loading {} {} items",&coll_key,data.len());
|
||||
}
|
||||
Self {
|
||||
entries: Arc::new(RwLock::new(data)),
|
||||
data_ctx,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue