Skip to content

Commit 04ffee4

Browse files
committed
fix
1 parent 0f38ba0 commit 04ffee4

File tree

3 files changed

+3
-10
lines changed

3 files changed

+3
-10
lines changed

crate2nix/src/config.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,14 +196,7 @@ impl Display for Source {
196196
sha256,
197197
registry,
198198
..
199-
} => write!(
200-
f,
201-
"{} {} from {}: {}",
202-
name,
203-
version,
204-
registry.to_string(),
205-
sha256
206-
),
199+
} => write!(f, "{} {} from {}: {}", name, version, registry, sha256),
207200
Source::Git { url, rev, sha256 } => write!(f, "{}#{} via git: {}", url, rev, sha256),
208201
Source::Nix { file, attr: None } => write!(f, "{}", file),
209202
Source::Nix {

crate2nix/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ fn prefetch_and_fill_registries(
225225
config: &GenerateConfig,
226226
default_nix: &mut BuildInfo,
227227
) -> Result<(), Error> {
228-
default_nix.registries = prefetch::prefetch_registries(config, &mut default_nix.crates)
228+
default_nix.registries = prefetch::prefetch_registries(config, &default_nix.crates)
229229
.map_err(|e| format_err!("while prefetching crates for calculating sha256: {}", e))?;
230230

231231
Ok(())

crate2nix/src/prefetch.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ pub fn prefetch_registries(
202202
&[&format!(
203203
"{}{}config.json",
204204
e.key(),
205-
if e.key().ends_with("/") { "" } else { "/" }
205+
if e.key().ends_with('/') { "" } else { "/" }
206206
)],
207207
)?;
208208
e.insert(out);

0 commit comments

Comments
 (0)