treewide: fix clippy lints
Signed-off-by: NotAShelf <raf@notashelf.dev> Change-Id: I411be69ff31f9cb39cd4cdebc8985b366a6a6964
This commit is contained in:
parent
b93b234fc2
commit
61ced09d25
43 changed files with 558 additions and 464 deletions
|
|
@ -9,7 +9,9 @@ pub fn execute(
|
|||
github_access_token: Option<String>,
|
||||
) -> Result<()> {
|
||||
let mut creds = PakkerCredentialsFile::load()?;
|
||||
let mut updated_any = false;
|
||||
let updated_any = curseforge_api_key.is_some()
|
||||
|| modrinth_token.is_some()
|
||||
|| github_access_token.is_some();
|
||||
|
||||
if let Some(key) = curseforge_api_key {
|
||||
let key = key.trim().to_string();
|
||||
|
|
@ -22,7 +24,6 @@ pub fn execute(
|
|||
println!("Setting CurseForge API key...");
|
||||
set_keyring_secret("curseforge_api_key", &key)?;
|
||||
creds.curseforge_api_key = Some(key);
|
||||
updated_any = true;
|
||||
}
|
||||
|
||||
if let Some(token) = modrinth_token {
|
||||
|
|
@ -36,7 +37,6 @@ pub fn execute(
|
|||
println!("Setting Modrinth token...");
|
||||
set_keyring_secret("modrinth_token", &token)?;
|
||||
creds.modrinth_token = Some(token);
|
||||
updated_any = true;
|
||||
}
|
||||
|
||||
if let Some(token) = github_access_token {
|
||||
|
|
@ -50,7 +50,6 @@ pub fn execute(
|
|||
println!("Setting GitHub access token...");
|
||||
set_keyring_secret("github_access_token", &token)?;
|
||||
creds.github_access_token = Some(token);
|
||||
updated_any = true;
|
||||
}
|
||||
|
||||
if !updated_any {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue