Skip to content

Commit 46c8595

Browse files
nbafrankclaude
andcommitted
Fix cargo fmt formatting
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 637501a commit 46c8595

4 files changed

Lines changed: 18 additions & 21 deletions

File tree

crates/uvr-core/src/registry/bioconductor.rs

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,7 @@ impl BiocRegistry {
4949

5050
// Try HTTP conditional request if we have a cached index
5151
if has_cache {
52-
if let Some((etag, last_modified)) =
53-
crate::registry::cran::read_cache_meta(&cache_key)
52+
if let Some((etag, last_modified)) = crate::registry::cran::read_cache_meta(&cache_key)
5453
{
5554
let mut req = client.get(&url);
5655
if let Some(ref e) = etag {
@@ -162,11 +161,7 @@ impl BiocRegistry {
162161
let _ = std::fs::create_dir_all(parent);
163162
}
164163
let _ = std::fs::write(&cache_path, &text);
165-
crate::registry::cran::write_cache_meta(
166-
&cache_key,
167-
new_etag.as_deref(),
168-
new_lm.as_deref(),
169-
);
164+
crate::registry::cran::write_cache_meta(&cache_key, new_etag.as_deref(), new_lm.as_deref());
170165

171166
info!("Bioconductor {bioc_release}: {} packages", packages.len());
172167
Ok(BiocRegistry {

crates/uvr-core/src/registry/cran.rs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -227,11 +227,7 @@ impl CranRegistry {
227227
let _ = std::fs::create_dir_all(parent);
228228
}
229229
let _ = std::fs::write(&cache_path, &decompressed);
230-
write_cache_meta(
231-
cache_key,
232-
new_etag.as_deref(),
233-
new_lm.as_deref(),
234-
);
230+
write_cache_meta(cache_key, new_etag.as_deref(), new_lm.as_deref());
235231
info!("{} index: {} packages (updated)", cache_key, index.len());
236232
return Ok(CranRegistry {
237233
index,
@@ -241,11 +237,18 @@ impl CranRegistry {
241237
}
242238
Ok(_) | Err(_) => {
243239
// Conditional request failed — fall back to cached data
244-
debug!("{} index: conditional request failed, using cache", cache_key);
240+
debug!(
241+
"{} index: conditional request failed, using cache",
242+
cache_key
243+
);
245244
let raw = std::fs::read(&cache_path)?;
246245
let text = String::from_utf8_lossy(&raw);
247246
let index = parse_packages_gz(&text)?;
248-
info!("{} index: {} packages (cached, stale)", cache_key, index.len());
247+
info!(
248+
"{} index: {} packages (cached, stale)",
249+
cache_key,
250+
index.len()
251+
);
249252
return Ok(CranRegistry {
250253
index,
251254
src_base: src_base.to_string(),

crates/uvr-core/src/sysreqs.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ pub async fn resolve_system_deps(
9090
};
9191

9292
if !resp.status().is_success() {
93-
debug!("Posit sysreqs API returned {} for {package_name}", resp.status());
93+
debug!(
94+
"Posit sysreqs API returned {} for {package_name}",
95+
resp.status()
96+
);
9497
return Ok(vec![]);
9598
}
9699

crates/uvr/src/commands/lock.rs

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,8 @@ async fn resolve_lockfile(
130130
let github_fut = resolve_github_deps(client, &project.manifest);
131131

132132
// Fetch all indices in parallel: CRAN + Bioc + custom repos + GitHub deps.
133-
let (cran_result, bioc_result, github_result, custom_result) = tokio::join!(
134-
cran_fut,
135-
bioc_fut,
136-
github_fut,
137-
custom_fut,
138-
);
133+
let (cran_result, bioc_result, github_result, custom_result) =
134+
tokio::join!(cran_fut, bioc_fut, github_fut, custom_fut,);
139135

140136
let cran = cran_result.context("Failed to fetch CRAN index")?;
141137
let bioc_opt = bioc_result?;

0 commit comments

Comments
 (0)