Skip to content

Commit b1cb968

Browse files
committed
clippy
1 parent ac74d1c commit b1cb968

File tree

6 files changed

+9
-12
lines changed

6 files changed

+9
-12
lines changed

src/index.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ use crate::{done, fatal, index_admin, index_auth, index_dev, info, NiceUnwrap};
55
use clap::Subcommand;
66
use reqwest::header::USER_AGENT;
77
use semver::VersionReq;
8-
use serde::{Deserialize, Serialize};
8+
use serde::Deserialize;
99
use serde_json::json;
1010
use sha3::{Digest, Sha3_256};
1111
use std::fs;

src/index_admin.rs

+1-4
Original file line numberDiff line numberDiff line change
@@ -366,10 +366,7 @@ fn update_dev_status(config: &Config) {
366366

367367
let client = reqwest::blocking::Client::new();
368368

369-
let url = index::get_index_url(
370-
format!("/v1/developers/{}", developer.id).to_string(),
371-
config,
372-
);
369+
let url = index::get_index_url(format!("/v1/developers/{}", developer.id), config);
373370
let response = client
374371
.put(url)
375372
.bearer_auth(config.index_token.as_ref().unwrap())

src/info.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -207,7 +207,7 @@ pub fn subcommand(cmd: Info) {
207207
}
208208

209209
config.sdk_nightly =
210-
Config::try_sdk_path().map_or(false, |path| path.join("bin/nightly").exists());
210+
Config::try_sdk_path().is_ok_and(|path| path.join("bin/nightly").exists());
211211

212212
done!("Config setup finished");
213213
config.save();

src/profile.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,7 @@ pub fn run_profile(profile: Option<String>, background: RunBackground, launch_ar
151151

152152
if background == RunBackground::ForegroundStay {
153153
info!("Press any key to exit");
154-
crossterm_input::input().read_char().unwrap_or('\0');
154+
_ = crossterm_input::input().read_char();
155155
}
156156
}
157157

src/project.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,7 @@ fn add_resource(dir: &Path, resource: ResourceType, files: Vec<PathBuf>) {
580580
.entry(name.to_string())
581581
.or_insert(json!([]))
582582
.as_array_mut()
583-
.nice_unwrap(&format!("{} is not an array", name)) = new_resource;
583+
.nice_unwrap(format!("{} is not an array", name)) = new_resource;
584584
};
585585

586586
match resource {

src/util/bmfont.rs

+4-4
Original file line numberDiff line numberDiff line change
@@ -322,10 +322,10 @@ fn extract_from_cache(
322322
if !shut_up {
323323
info!("Extracting '{}' from cache", path_name);
324324
}
325-
return cache_bundle.try_extract_cached_into(
326-
path_name,
327-
&working_dir.join(path.file_name().unwrap().to_str().unwrap()),
328-
);
325+
cache_bundle.try_extract_cached_into(
326+
path_name,
327+
&working_dir.join(path.file_name().unwrap().to_str().unwrap()),
328+
)
329329
}
330330

331331
pub fn get_font_bundles(

0 commit comments

Comments
 (0)