Cargo fmt

This commit is contained in:
Aode (lion) 2021-09-06 12:09:25 -05:00
parent 0d5ce07b20
commit a0f7148924
2 changed files with 5 additions and 4 deletions

View File

@ -72,9 +72,8 @@ static TMP_DIR: Lazy<PathBuf> = Lazy::new(|| {
path path
}); });
static CONFIG: Lazy<Config> = Lazy::new(Config::from_args); static CONFIG: Lazy<Config> = Lazy::new(Config::from_args);
static PROCESS_SEMAPHORE: Lazy<tokio::sync::Semaphore> = Lazy::new(|| tokio::sync::Semaphore::new( static PROCESS_SEMAPHORE: Lazy<tokio::sync::Semaphore> =
num_cpus::get().saturating_sub(1).max(1), Lazy::new(|| tokio::sync::Semaphore::new(num_cpus::get().saturating_sub(1).max(1)));
));
static PROCESS_MAP: Lazy<DashMap<PathBuf, Vec<Sender<(Details, web::Bytes)>>>> = static PROCESS_MAP: Lazy<DashMap<PathBuf, Vec<Sender<(Details, web::Bytes)>>>> =
Lazy::new(DashMap::new); Lazy::new(DashMap::new);

View File

@ -80,6 +80,8 @@ impl SledTree for sled034::Tree {
} }
fn flush(&self) -> Result<(), UploadError> { fn flush(&self) -> Result<(), UploadError> {
sled034::Tree::flush(self).map(|_| ()).map_err(UploadError::from) sled034::Tree::flush(self)
.map(|_| ())
.map_err(UploadError::from)
} }
} }