Skip to content

Commit 7b85532

Browse files
committed
fix(clippy): apply clippy suggestions
1 parent 5ed1951 commit 7b85532

3 files changed

Lines changed: 7 additions & 12 deletions

File tree

crates/soar-config/src/config.rs

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -437,14 +437,9 @@ impl Config {
437437

438438
repo.enabled.get_or_insert(true);
439439

440-
if repo.pubkey.is_none() {
441-
match repo.name.as_str() {
442-
"soarpkgs" => {
443-
repo.pubkey =
444-
Some("https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/keys/minisign.pub".to_string())
445-
}
446-
_ => {}
447-
}
440+
if repo.pubkey.is_none() && repo.name.as_str() == "soarpkgs" {
441+
repo.pubkey =
442+
Some("https://raw.githubusercontent.com/pkgforge/soarpkgs/refs/heads/main/keys/minisign.pub".to_string())
448443
}
449444
}
450445

crates/soar-db/src/models/types.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -44,8 +44,8 @@ impl PackageProvide {
4444
}
4545

4646
pub fn from_string(provide: &str) -> Self {
47-
let (symlink_to_bin, provide) = if provide.starts_with('@') {
48-
(true, &provide[1..])
47+
let (symlink_to_bin, provide) = if let Some(stripped) = provide.strip_prefix('@') {
48+
(true, stripped)
4949
} else {
5050
(false, provide)
5151
};

crates/soar-utils/src/system.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,11 +67,11 @@ mod tests {
6767
fn test_platform() {
6868
#[cfg(target_arch = "x86_64")]
6969
#[cfg(target_os = "linux")]
70-
assert_eq!(platform(), "x86_64-Linux");
70+
assert_eq!(platform(), "x86_64-linux");
7171

7272
#[cfg(target_arch = "aarch64")]
7373
#[cfg(target_os = "linux")]
74-
assert_eq!(platform(), "aarch64-Linux");
74+
assert_eq!(platform(), "aarch64-linux");
7575
}
7676

7777
#[test]

0 commit comments

Comments
 (0)