Skip to content

Commit 3acd8fd

Browse files
committed
Fix new clippy warnings
1 parent 656db30 commit 3acd8fd

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/app.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ fn load_gpg_key(
3535
if output.status.success() {
3636
Ok(Some(general_purpose::STANDARD.encode(&output.stdout)))
3737
} else {
38-
Err(io::Error::new(io::ErrorKind::Other, "gpg2 --export failed"))
38+
Err(io::Error::other("gpg2 --export failed"))
3939
}
4040
}
4141
None => Ok(None),
@@ -45,7 +45,7 @@ fn load_gpg_key(
4545
pub fn load_config<P: AsRef<Path>>(path: P) -> io::Result<Config> {
4646
let config_contents = std::fs::read_to_string(path)?;
4747
let mut config_data: Config = serde_json::from_str(&config_contents)
48-
.map_err(|err| io::Error::new(io::ErrorKind::Other, err))?;
48+
.map_err(io::Error::other)?;
4949

5050
config_data.build_gpg_key_content =
5151
load_gpg_key(&config_data.gpg_homedir, &config_data.build_gpg_key)?;

src/bin/delta-generator-client.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -244,7 +244,7 @@ pub fn upload_delta(
244244
future::loop_fn(
245245
(0, fs_pool, repo_path, delta, base_url, token, repo),
246246
move |(attempt, fs_pool, repo_path, delta, base_url, token, repo)| {
247-
let url = format!("{}/api/v1/delta/upload/{}", base_url, repo);
247+
let url = format!("{base_url}/api/v1/delta/upload/{repo}");
248248
let mut mpart = MultipartRequest::default();
249249
futures::done(add_delta_parts(&fs_pool, &repo_path, &delta, &mut mpart)).and_then(
250250
move |_| {
@@ -254,7 +254,7 @@ pub fn upload_delta(
254254
header::CONTENT_TYPE,
255255
format!("multipart/form-data; boundary={}", mpart.get_boundary()),
256256
)
257-
.header(header::AUTHORIZATION, format!("Bearer {}", token))
257+
.header(header::AUTHORIZATION, format!("Bearer {token}"))
258258
.timeout(UPLOAD_TIMEOUT)
259259
.method(http::Method::POST)
260260
.send_body(actix_http::body::BodyStream::new(mpart))

src/jobs/prune_job.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ impl JobInstance for PruneJobInstance {
4343
.ok_or_else(|| JobError::new("No repo specified"))?;
4444
let repoconfig = config
4545
.get_repoconfig(repo)
46-
.map_err(|_e| JobError::new(&format!("Can't find repo {}", repo)))?;
46+
.map_err(|_e| JobError::new(&format!("Can't find repo {repo}")))?;
4747

4848
let repo_path = repoconfig.get_abs_repo_path();
4949

0 commit comments

Comments
 (0)