Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 2 additions & 3 deletions crates/aube-lockfile/src/source.rs
Original file line number Diff line number Diff line change
Expand Up @@ -259,10 +259,9 @@ impl LocalSource {
("link", r)
} else if let Some(r) = spec.strip_prefix("portal:") {
("portal", r)
} else if let Some(r) = spec.strip_prefix("exec:") {
return Some(LocalSource::Exec(PathBuf::from(r)));
} else {
return None;
let r = spec.strip_prefix("exec:")?;
return Some(LocalSource::Exec(PathBuf::from(r)));
};
let rel = PathBuf::from(rest);
let abs = project_root.join(&rel);
Expand Down
5 changes: 5 additions & 0 deletions crates/aube/src/progress/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,11 @@ fn overflow_fetch_label(count: usize) -> String {
fn clamp_reused_to(reused: &AtomicUsize, downloaded: &AtomicUsize, total: usize) {
let dl = downloaded.load(Ordering::Relaxed);
let cap = total.saturating_sub(dl);
// `fetch_update` is renamed to `try_update` in Rust 1.99, but that method
// is only stable since 1.95 and our MSRV is 1.93 — switch once the MSRV
// clears 1.95. The deprecation is nightly-only for now; allow it so a
// nightly `clippy -D warnings` stays green.
#[allow(deprecated)]
let _ = reused.fetch_update(Ordering::Relaxed, Ordering::Relaxed, |cur| {
(cur > cap).then_some(cap)
});
Expand Down
Loading