diff --git a/Cargo.toml b/Cargo.toml index a3a6c92..7db6f99 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "re_set-lib" -version = "5.2.4" +version = "5.2.5" edition = "2021" description = "Data structure library for ReSet" repository = "https://github.com/Xetibo/ReSet-Lib" diff --git a/src/lib.rs b/src/lib.rs index a0c939c..e7f8415 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -40,9 +40,9 @@ impl fmt::Display for PathNotFoundError { pub fn create_config_directory(project_name: &str) -> Option { let base_dir = xdg::BaseDirectories::new(); - if let Err(error) = base_dir { + if let Err(_error) = base_dir { ERROR!( - format!("Could not get base directories: {}", error), + format!("Could not get base directories: {}", _error), ErrorLevel::Critical ); return None; @@ -51,9 +51,9 @@ pub fn create_config_directory(project_name: &str) -> Option { let base_dir = flatpak_fix(base_dir); let project_dir = base_dir.join(project_name); let res = fs::create_dir_all(&project_dir); - if let Err(error) = res { + if let Err(_error) = res { ERROR!( - format!("Could create project directory: {}", error), + format!("Could create project directory: {}", _error), ErrorLevel::Critical ); return None; @@ -69,17 +69,17 @@ pub fn create_config(project_name: &str) -> Option { .create_new(true) .write(true) .open(&config_file); - if let Err(error) = res { + if let Err(_error) = res { ERROR!( - format!("Could not open config file: {}", error), + format!("Could not open config file: {}", _error), ErrorLevel::Critical ); return None; } } - if let Err(error) = config_file.metadata() { + if let Err(_error) = config_file.metadata() { ERROR!( - format!("Metadata of file is faulty: {}", error), + format!("Metadata of file is faulty: {}", _error), ErrorLevel::Critical ); return None; @@ -123,9 +123,9 @@ fn handle_config(flags: &mut Flags, file: Option<&String>) { } let path = file.unwrap(); let data = fs::metadata(path); - if let Err(error) = data { + if let Err(_error) = data { ERROR!( - format!("Provided path had errors: {}", error), + format!("Provided path had errors: {}", _error), ErrorLevel::Critical ); return; diff --git a/src/utils/config.rs b/src/utils/config.rs index f86d081..5c1bde6 100644 --- a/src/utils/config.rs +++ b/src/utils/config.rs @@ -25,18 +25,18 @@ pub fn parse_config() -> Table { "Using config file path: {}", CONFIG_STRING.as_str() )); - if let Err(error) = config_file { + if let Err(_errorr) = config_file { ERROR!( - format!("Could not write config file: {}", error), + format!("Could not write config file: {}", _errorr), ErrorLevel::Recoverable ); return Table::new(); } let mut config_string = String::from(""); let err = config_file.unwrap().read_to_string(&mut config_string); - if let Err(error) = err { + if let Err(_error) = err { ERROR!( - format!("Could not read config file: {}", error), + format!("Could not read config file: {}", _error), ErrorLevel::Recoverable ); return Table::new(); diff --git a/src/utils/plugin_setup.rs b/src/utils/plugin_setup.rs index 7f63d95..8d064b5 100644 --- a/src/utils/plugin_setup.rs +++ b/src/utils/plugin_setup.rs @@ -238,33 +238,33 @@ fn setup_frontend_plugins() -> Vec { tests_frontend, )); } - (Err(error), _, _, _, _) => { + (Err(_error), _, _, _, _) => { ERROR!( - format!("Failed to load plugin function: {}", error), + format!("Failed to load plugin function: {}", _error), ErrorLevel::PartialBreakage ); } - (_, Err(error), _, _, _) => { + (_, Err(_error), _, _, _) => { ERROR!( - format!("Failed to load plugin function: {}", error), + format!("Failed to load plugin function: {}", _error), ErrorLevel::PartialBreakage ); } - (_, _, Err(error), _, _) => { + (_, _, Err(_error), _, _) => { ERROR!( - format!("Failed to load plugin function: {}", error), + format!("Failed to load plugin function: {}", _error), ErrorLevel::PartialBreakage ); } - (_, _, _, Err(error), _) => { + (_, _, _, Err(_error), _) => { ERROR!( - format!("Failed to load plugin function: {}", error), + format!("Failed to load plugin function: {}", _error), ErrorLevel::PartialBreakage ); } - (_, _, _, _, Err(error)) => { + (_, _, _, _, Err(_error)) => { ERROR!( - format!("Failed to load plugin function: {}", error), + format!("Failed to load plugin function: {}", _error), ErrorLevel::PartialBreakage ); } @@ -280,9 +280,9 @@ fn get_plugin_capabilities(lib: &Library) -> Option { libloading::Symbol PluginCapabilities>, libloading::Error, > = lib.get(b"capabilities"); - if let Err(error) = capabilities { + if let Err(_error) = capabilities { ERROR!( - format!("Failed to load plugin: {}", error), + format!("Failed to load plugin: {}", _error), ErrorLevel::Critical ); return None; @@ -387,7 +387,7 @@ impl<'a> CrossWrapper<'a> { data: T, ) { self.0.insert( - "/org/Xebito/ReSet/Plugins/".to_string() + &object_name.into(), + "/org/Xetibo/ReSet/Plugins/".to_string() + &object_name.into(), interfaces, data, );