mirror of
https://git.asonix.dog/asonix/pict-rs
synced 2024-11-10 06:25:00 +00:00
clippy
This commit is contained in:
parent
fb6315f4e8
commit
5b44de2070
4 changed files with 5 additions and 4 deletions
|
@ -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()?,
|
||||||
)?;
|
)?;
|
||||||
|
|
||||||
|
|
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
||||||
|
|
|
@ -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,
|
||||||
|
|
Loading…
Reference in a new issue