Fixes
Reboot, I64 instead of Option<I64>
This commit is contained in:
parent
9d43687f8b
commit
1f878b9314
13 changed files with 512 additions and 452 deletions
|
|
@ -1,5 +1,6 @@
|
|||
use json::{self, JsonValue, array};
|
||||
|
||||
use crate::gui::log_panel::log_message;
|
||||
use crate::users::contact::Contact;
|
||||
use crate::util::file_util::{load_file, save_file};
|
||||
|
||||
|
|
@ -14,7 +15,7 @@ pub fn mod_user(storage_owner: i64, contact: &Contact) {
|
|||
};
|
||||
|
||||
for i in 0..contacts.len() {
|
||||
if contacts[i]["user_id"].as_str() == Some(&contact.user_id.unwrap().to_string()) {
|
||||
if contacts[i]["user_id"] == contact.user_id {
|
||||
contacts.array_remove(i);
|
||||
break;
|
||||
}
|
||||
|
|
@ -56,6 +57,5 @@ pub fn get_users(storage_owner: i64) -> JsonValue {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
contacts_out
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ use crate::util::file_util::{load_file, save_file};
|
|||
use json::JsonValue;
|
||||
use once_cell::sync::Lazy;
|
||||
use tokio::sync::RwLock;
|
||||
use uuid::Uuid;
|
||||
|
||||
pub static CONFIG: Lazy<RwLock<ConfigUtil>> = Lazy::new(|| RwLock::new(ConfigUtil::new()));
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue