Skip to content

Commit

Permalink
chore: clippy fix
Browse files Browse the repository at this point in the history
  • Loading branch information
DaRacci committed Oct 3, 2023
1 parent a564e1f commit 29ec950
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions crates/backup/src/config/backend.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ use indicatif::{MultiProgress, ProgressBar};
use serde::{Deserialize, Serialize};
use std::fmt::{Display, Formatter};

#[allow(clippy::large_enum_variant)]
#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
pub enum Backend {
S3(S3Core),
Expand Down
2 changes: 1 addition & 1 deletion crates/backup/src/config/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@ impl Config {
false => Err(Error::NotFound(path.to_path_buf()).into()),
true => {
let mut slice = vec![];
fs::File::open(path).await?.read(&mut slice).await?;
fs::File::open(path).await?.read_to_end(&mut slice).await?;
serde_json::from_slice(&slice)
.map_err(Error::Serde)
.map(|mut config: Config| {
Expand Down
1 change: 1 addition & 0 deletions crates/backup/src/config/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
*/

pub mod backend;
#[allow(clippy::module_inception)] // FIXME
pub mod config;
pub mod rules;
pub mod runtime;
2 changes: 1 addition & 1 deletion crates/backup/src/sources/op/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ pub mod item {
if password_details.is_some() {
let into = password_details
.clone() // TODO -> Better error handling
.expect(&format!("Get password details of {value}"))
.unwrap_or_else(|| panic!("Get password details of {value}"))
.into();
let _ = password_history.insert(into);
}
Expand Down
1 change: 1 addition & 0 deletions crates/cleaner/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
#![feature(associated_type_defaults)]
#![feature(extend_one)]
#![feature(io_error_more)]
#![allow(incomplete_features)]
#![feature(inherent_associated_types)]

pub mod application;
Expand Down

0 comments on commit 29ec950

Please sign in to comment.