This commit is contained in:
Aode (lion) 2021-11-23 16:31:15 -06:00
parent fb6315f4e8
commit 5b44de2070
4 changed files with 5 additions and 4 deletions

View file

@ -845,7 +845,7 @@ where
config::Store::FileStore { path } => {
let path = path.to_owned().unwrap_or_else(|| CONFIG.data_dir());
let to = FileStore::build(path, &db)?;
let to = FileStore::build(path, db)?;
manager.restructure(&to).await?;
manager.migrate_store::<S1, FileStore>(from, to).await?;
@ -868,7 +868,7 @@ where
secret_key.clone(),
security_token.clone(),
session_token.clone(),
&db,
db,
build_reqwest_client()?,
)?;

View file

@ -96,7 +96,7 @@ impl Range {
impl RangeHeader {
pub(crate) fn single_bytes_range(&self) -> Option<&'_ Range> {
if self.ranges.len() == 1 && self.unit == "bytes" {
self.ranges.iter().next()
self.ranges.get(0)
} else {
None
}

View file

@ -100,7 +100,7 @@ impl UploadManager {
filename: &str,
) -> Result<Vec<u8>, Error> {
let path = self
.generalize_path(&store, variant_process_path)?
.generalize_path(store, variant_process_path)?
.strip_prefix("files")?;
self.variant_key(path, filename)

View file

@ -153,6 +153,7 @@ impl Store for ObjectStore {
}
impl ObjectStore {
#[allow(clippy::too_many_arguments)]
pub(crate) fn build(
bucket_name: &str,
region: Region,