From 87ad2439b9913cf1ad124c37b2a25ca92e7e0782 Mon Sep 17 00:00:00 2001 From: notplants Date: Wed, 15 Jun 2022 13:46:51 +0200 Subject: [PATCH] Fix cargo fmt --- peach-config/src/set_permissions.rs | 8 ++++---- peach-lib/src/sbot.rs | 15 ++++++++++++--- 2 files changed, 16 insertions(+), 7 deletions(-) diff --git a/peach-config/src/set_permissions.rs b/peach-config/src/set_permissions.rs index 0ad2ac8..c50ffd0 100644 --- a/peach-config/src/set_permissions.rs +++ b/peach-config/src/set_permissions.rs @@ -8,10 +8,10 @@ use crate::utils::cmd; lazy_static! { pub static ref PEACH_CONFIGDIR: String = config_manager::get_config_value("PEACH_CONFIGDIR") .expect("Failed to load config value for PEACH_CONFIGDIR"); - pub static ref PEACH_WEBDIR: String = - config_manager::get_config_value("PEACH_WEBDIR").expect("Failed to load config value for PEACH_WEBDIR"); - pub static ref PEACH_HOMEDIR: String = - config_manager::get_config_value("PEACH_HOMEDIR").expect("Failed to load config value for PEACH_HOMEDIR"); + pub static ref PEACH_WEBDIR: String = config_manager::get_config_value("PEACH_WEBDIR") + .expect("Failed to load config value for PEACH_WEBDIR"); + pub static ref PEACH_HOMEDIR: String = config_manager::get_config_value("PEACH_HOMEDIR") + .expect("Failed to load config value for PEACH_HOMEDIR"); } /// Utility function to set correct file permissions on the PeachCloud device. diff --git a/peach-lib/src/sbot.rs b/peach-lib/src/sbot.rs index 35f869f..e2ddba7 100644 --- a/peach-lib/src/sbot.rs +++ b/peach-lib/src/sbot.rs @@ -128,7 +128,10 @@ impl SbotStatus { } // get path to blobstore - let blobstore_path = format!("{}/blobs/sha256", config_manager::get_config_value("GO_SBOT_DATADIR")?); + let blobstore_path = format!( + "{}/blobs/sha256", + config_manager::get_config_value("GO_SBOT_DATADIR")? + ); // determine the size of the blobstore directory in bytes status.blobstore = dir_size(blobstore_path).ok(); @@ -200,7 +203,10 @@ impl SbotConfig { /// Read the go-sbot `config.toml` file from file and deserialize into `SbotConfig`. pub fn read() -> Result { // determine path of user's go-sbot config.toml - let config_path = format!("{}/config.toml", config_manager::get_config_value("GO_SBOT_DATADIR")?); + let config_path = format!( + "{}/config.toml", + config_manager::get_config_value("GO_SBOT_DATADIR")? + ); let config_contents = fs::read_to_string(config_path)?; @@ -217,7 +223,10 @@ impl SbotConfig { let config_string = toml::to_string(&config)?; // determine path of user's go-sbot config.toml - let config_path = format!("{}/config.toml", config_manager::get_config_value("GO_SBOT_DATADIR")?); + let config_path = format!( + "{}/config.toml", + config_manager::get_config_value("GO_SBOT_DATADIR")? + ); // open config file for writing let mut file = File::create(config_path)?;