Skip to content

Commit

Permalink
DBus: fix Xebito
Browse files Browse the repository at this point in the history
  • Loading branch information
DashieTM committed Jun 13, 2024
1 parent 4b06b65 commit 6d01450
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 28 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -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"
Expand Down
20 changes: 10 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ impl fmt::Display for PathNotFoundError {

pub fn create_config_directory(project_name: &str) -> Option<PathBuf> {
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;
Expand All @@ -51,9 +51,9 @@ pub fn create_config_directory(project_name: &str) -> Option<PathBuf> {
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;
Expand All @@ -69,17 +69,17 @@ pub fn create_config(project_name: &str) -> Option<PathBuf> {
.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;
Expand Down Expand Up @@ -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;
Expand Down
8 changes: 4 additions & 4 deletions src/utils/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
26 changes: 13 additions & 13 deletions src/utils/plugin_setup.rs
Original file line number Diff line number Diff line change
Expand Up @@ -238,33 +238,33 @@ fn setup_frontend_plugins() -> Vec<FrontendPluginFunctions> {
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
);
}
Expand All @@ -280,9 +280,9 @@ fn get_plugin_capabilities(lib: &Library) -> Option<PluginCapabilities> {
libloading::Symbol<unsafe extern "C" fn() -> 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;
Expand Down Expand Up @@ -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,
);
Expand Down

0 comments on commit 6d01450

Please sign in to comment.