Skip to content

Commit 19f097f

Browse files
committed
Format
1 parent 04ee081 commit 19f097f

File tree

3 files changed

+6
-15
lines changed

3 files changed

+6
-15
lines changed

magic-nix-cache/src/binary_cache.rs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -96,10 +96,8 @@ async fn put_narinfo(
9696
let allocation = gha_cache.api.allocate_file_with_random_suffix(&key).await?;
9797

9898
let body_stream = body.into_data_stream();
99-
let stream = StreamReader::new(
100-
body_stream
101-
.map(|r| r.map_err(|e| std::io::Error::other(e.to_string()))),
102-
);
99+
let stream =
100+
StreamReader::new(body_stream.map(|r| r.map_err(|e| std::io::Error::other(e.to_string()))));
103101

104102
gha_cache.api.upload_file(allocation, stream).await?;
105103
state.metrics.narinfos_uploaded.incr();
@@ -147,10 +145,8 @@ async fn put_nar(
147145
.await?;
148146

149147
let body_stream = body.into_data_stream();
150-
let stream = StreamReader::new(
151-
body_stream
152-
.map(|r| r.map_err(|e| std::io::Error::other(e.to_string()))),
153-
);
148+
let stream =
149+
StreamReader::new(body_stream.map(|r| r.map_err(|e| std::io::Error::other(e.to_string()))));
154150

155151
gha_cache.api.upload_file(allocation, stream).await?;
156152
state.metrics.nars_uploaded.incr();

magic-nix-cache/src/gha.rs

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -176,9 +176,7 @@ async fn upload_path(
176176

177177
let nar_stream = store.nar_from_path(path.clone());
178178

179-
let nar_reader = nar_stream
180-
.map_err(std::io::Error::other)
181-
.into_async_read();
179+
let nar_reader = nar_stream.map_err(std::io::Error::other).into_async_read();
182180

183181
let nar_compressor = ZstdEncoder::new(nar_reader.compat());
184182

magic-nix-cache/src/main.rs

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -296,10 +296,7 @@ async fn main_cli(args: Args, recorder: detsys_ids_client::Recorder) -> Result<(
296296
)
297297
.await;
298298
recorder
299-
.set_fact(
300-
"dnixd_availability",
301-
format!("{dnixd_available:?}").into(),
302-
)
299+
.set_fact("dnixd_availability", format!("{dnixd_available:?}").into())
303300
.await;
304301

305302
let flakehub_auth_method: Option<FlakeHubAuthSource> = match (

0 commit comments

Comments
 (0)