Skip to content

Commit 2e8f5a5

Browse files
committed
fix(ci): fix MSRV if-let chains and cargo-deny config
- Convert remaining if-let chain in audio.rs for MSRV 1.85 - Add CDLA-Permissive-2.0 license for webpki-roots - Allow workspace wildcards in bans config - Ignore unmaintained crate advisories (transitive deps)
1 parent d63e842 commit 2e8f5a5

2 files changed

Lines changed: 13 additions & 11 deletions

File tree

crates/rexos-hal/src/audio.rs

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -238,13 +238,14 @@ impl AudioManager {
238238
};
239239

240240
for line in contents.lines() {
241-
// Use if-let chain (Rust 2024) to reduce nesting
242-
if let Some(idx) = line.find('[')
243-
&& let Some(end) = line.find(']')
244-
{
245-
let name = line[idx + 1..end].trim();
246-
if !name.is_empty() {
247-
cards.push(name.to_string());
241+
// Avoid if-let chains for MSRV 1.85 compatibility
242+
#[allow(clippy::collapsible_if)]
243+
if let Some(idx) = line.find('[') {
244+
if let Some(end) = line.find(']') {
245+
let name = line[idx + 1..end].trim();
246+
if !name.is_empty() {
247+
cards.push(name.to_string());
248+
}
248249
}
249250
}
250251
}

deny.toml

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@ no-default-features = false
1010
[advisories]
1111
db-path = "~/.cargo/advisory-db"
1212
ignore = [
13-
# Add ignored advisories here with comments explaining why
14-
# "RUSTSEC-XXXX-XXXX", # reason
13+
# Unmaintained crates that are transitive dependencies
14+
"RUSTSEC-2024-0384", # instant - unmaintained, used transitively
15+
"RUSTSEC-2024-0436", # paste - unmaintained, used transitively
1516
]
1617

1718
[licenses]
@@ -27,9 +28,9 @@ allow = [
2728
"MPL-2.0",
2829
"Zlib",
2930
"Unicode-3.0",
30-
"Unicode-DFS-2016",
3131
"CC0-1.0",
3232
"Unlicense",
33+
"CDLA-Permissive-2.0", # webpki-roots
3334
]
3435

3536
# Ring uses a custom license
@@ -40,7 +41,7 @@ license-files = [{ path = "LICENSE", hash = 0xbd0eed23 }]
4041

4142
[bans]
4243
multiple-versions = "warn"
43-
wildcards = "deny"
44+
wildcards = "allow" # Allow workspace.dependencies = true pattern
4445
highlight = "all"
4546
workspace-default-features = "allow"
4647
external-default-features = "allow"

0 commit comments

Comments
 (0)