Skip to content

Commit bb3786d

Browse files
committed
chore: address clippy warnings
1 parent c88ec93 commit bb3786d

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

aggregation_mode/src/backend/retry.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,8 @@ pub enum RetryError<E> {
1111
impl<E: std::fmt::Display> std::fmt::Display for RetryError<E> {
1212
fn fmt(&self, f: &mut std::fmt::Formatter) -> std::fmt::Result {
1313
match self {
14-
RetryError::Transient(e) => write!(f, "{}", e),
15-
RetryError::Permanent(e) => write!(f, "{}", e),
14+
RetryError::Transient(e) => write!(f, "{e}"),
15+
RetryError::Permanent(e) => write!(f, "{e}"),
1616
}
1717
}
1818
}

aggregation_mode/src/backend/s3.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -53,8 +53,8 @@ pub async fn get_aligned_batch_from_s3_with_multiple_urls(
5353
return Ok(data);
5454
}
5555
Err(err) => {
56-
warn!("Failed to fetch batch from URL {}: {:?}", url, err);
57-
errors.push(format!("URL {}: {:?}", url, err));
56+
warn!("Failed to fetch batch from URL {url}: {err:?}");
57+
errors.push(format!("URL {url}: {err:?}"));
5858
}
5959
}
6060
}
@@ -84,7 +84,7 @@ fn parse_batch_urls(batch_urls: &str) -> Vec<String> {
8484
async fn get_aligned_batch_from_s3_retryable(
8585
url: String,
8686
) -> Result<Vec<VerificationData>, RetryError<GetBatchProofsError>> {
87-
info!("Fetching batch from S3 URL: {}", url);
87+
info!("Fetching batch from S3 URL: {url}");
8888
let client = reqwest::Client::builder()
8989
.user_agent(DEFAULT_USER_AGENT)
9090
.connect_timeout(CONNECT_TIMEOUT_SECONDS)
@@ -95,7 +95,7 @@ async fn get_aligned_batch_from_s3_retryable(
9595
})?;
9696

9797
let response = client.get(&url).send().await.map_err(|e| {
98-
warn!("Failed to send request to {}: {}", url, e);
98+
warn!("Failed to send request to {url}: {e}");
9999
RetryError::Transient(GetBatchProofsError::FetchingS3Batch(e.to_string()))
100100
})?;
101101

@@ -122,13 +122,13 @@ async fn get_aligned_batch_from_s3_retryable(
122122
}
123123

124124
let bytes = response.bytes().await.map_err(|e| {
125-
warn!("Failed to read response body from {}: {}", url, e);
125+
warn!("Failed to read response body from {url}: {e}");
126126
RetryError::Transient(GetBatchProofsError::EmptyBody(e.to_string()))
127127
})?;
128128
let bytes: &[u8] = bytes.iter().as_slice();
129129

130130
let data: Vec<VerificationData> = ciborium::from_reader(bytes).map_err(|e| {
131-
warn!("Failed to deserialize batch data from {}: {}", url, e);
131+
warn!("Failed to deserialize batch data from {url}: {e}");
132132
RetryError::Permanent(GetBatchProofsError::Deserialization(e.to_string()))
133133
})?;
134134

crates/batcher/build.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ fn main() {
2626

2727
go_build.status().expect("Go build failed");
2828

29-
println!("cargo:rerun-if-changed={}", GO_SRC);
29+
println!("cargo:rerun-if-changed={GO_SRC}");
3030
println!(
3131
"cargo:rustc-link-search=native={}",
3232
out_dir.to_str().unwrap()
@@ -36,5 +36,5 @@ fn main() {
3636
println!("cargo:rustc-link-arg=-Wl,--allow-multiple-definition");
3737
}
3838

39-
println!("cargo:rustc-link-lib=static={}", GO_LIB);
39+
println!("cargo:rustc-link-lib=static={GO_LIB}");
4040
}

0 commit comments

Comments
 (0)