Fix cargo fmt
continuous-integration/drone/pr Build is passing
Details
continuous-integration/drone/pr Build is passing
Details
This commit is contained in:
parent
5838faf128
commit
87ad2439b9
|
@ -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.
|
||||
|
|
|
@ -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<Self, PeachError> {
|
||||
// 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)?;
|
||||
|
|
Loading…
Reference in New Issue