Skip to content

Commit cff169a

Browse files
committed
chore: fix minor clippy lints
Signed-off-by: Max Leonard Inden <mail@max-inden.de>
1 parent adc7c4e commit cff169a

5 files changed

Lines changed: 6 additions & 6 deletions

File tree

benches/encoding/text.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,12 +54,12 @@ pub fn text(c: &mut Criterion) {
5454
});
5555

5656
registry.register(
57-
format!("my_counter_{}", i),
57+
format!("my_counter_{i}"),
5858
"My counter",
5959
counter_family.clone(),
6060
);
6161
registry.register(
62-
format!("my_histogram_{}", i),
62+
format!("my_histogram_{i}"),
6363
"My histogram",
6464
histogram_family.clone(),
6565
);

examples/axum.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ async fn main() {
8080
.route("/handler", get(some_handler))
8181
.with_state(metrics);
8282
let port = 8080;
83-
let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", port))
83+
let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{port}"))
8484
.await
8585
.unwrap();
8686

examples/custom-metric.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,5 +41,5 @@ fn main() {
4141
let mut encoded = String::new();
4242
encode(&mut encoded, &registry).unwrap();
4343

44-
println!("Scrape output:\n{:?}", encoded);
44+
println!("Scrape output:\n{encoded:?}");
4545
}

examples/hyper.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ pub fn make_handler(
7676
Box::pin(async move {
7777
let mut buf = String::new();
7878
encode(&mut buf, &reg.clone())
79-
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
79+
.map_err(std::io::Error::other)
8080
.map(|_| {
8181
let body = full(Bytes::from(buf));
8282
Response::builder()

src/encoding/text.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1218,7 +1218,7 @@ mod tests {
12181218
fn parse_with_python_client(input: String) {
12191219
pyo3::prepare_freethreaded_python();
12201220

1221-
println!("{:?}", input);
1221+
println!("{input:?}");
12221222
Python::with_gil(|py| {
12231223
let parser = PyModule::from_code_bound(
12241224
py,

0 commit comments

Comments
 (0)