2
0
Fork 0
mirror of https://git.asonix.dog/asonix/pict-rs synced 2024-12-22 19:31:35 +00:00
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 } => { config::Store::FileStore { path } => {
let path = path.to_owned().unwrap_or_else(|| CONFIG.data_dir()); 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.restructure(&to).await?;
manager.migrate_store::<S1, FileStore>(from, to).await?; manager.migrate_store::<S1, FileStore>(from, to).await?;
@ -868,7 +868,7 @@ where
secret_key.clone(), secret_key.clone(),
security_token.clone(), security_token.clone(),
session_token.clone(), session_token.clone(),
&db, db,
build_reqwest_client()?, build_reqwest_client()?,
)?; )?;

View file

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

View file

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

View file

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