Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions benches/encoding/proto.rs
Original file line number Diff line number Diff line change
Expand Up @@ -47,20 +47,20 @@ pub fn proto(c: &mut Criterion) {
});

registry.register(
format!("my_counter{}", i),
format!("my_counter{i}"),
"My counter",
counter_family.clone(),
);
registry.register(
format!("my_histogram{}", i),
format!("my_histogram{i}"),
"My histogram",
histogram_family.clone(),
);

for j in 0_u32..100 {
counter_family
.get_or_create(&CounterLabels {
path: format!("/path/{}", i),
path: format!("/path/{i}"),
method: Method::Get,
some_number: j.into(),
})
Expand Down
4 changes: 2 additions & 2 deletions benches/encoding/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,12 @@ pub fn text(c: &mut Criterion) {
});

registry.register(
format!("my_counter_{}", i),
format!("my_counter_{i}"),
"My counter",
counter_family.clone(),
);
registry.register(
format!("my_histogram_{}", i),
format!("my_histogram_{i}"),
"My histogram",
histogram_family.clone(),
);
Expand Down
2 changes: 1 addition & 1 deletion examples/axum.rs
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ async fn main() {
.route("/handler", get(some_handler))
.with_state(metrics);
let port = 8080;
let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{}", port))
let listener = tokio::net::TcpListener::bind(format!("0.0.0.0:{port}"))
.await
.unwrap();

Expand Down
2 changes: 1 addition & 1 deletion examples/custom-metric.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,5 +41,5 @@ fn main() {
let mut encoded = String::new();
encode(&mut encoded, &registry).unwrap();

println!("Scrape output:\n{:?}", encoded);
println!("Scrape output:\n{encoded:?}");
}
2 changes: 1 addition & 1 deletion examples/hyper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ pub fn make_handler(
Box::pin(async move {
let mut buf = String::new();
encode(&mut buf, &reg.clone())
.map_err(|e| std::io::Error::new(std::io::ErrorKind::Other, e))
.map_err(std::io::Error::other)
.map(|_| {
let body = full(Bytes::from(buf));
Response::builder()
Expand Down
2 changes: 1 addition & 1 deletion src/encoding/text.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1218,7 +1218,7 @@ mod tests {
fn parse_with_python_client(input: String) {
pyo3::prepare_freethreaded_python();

println!("{:?}", input);
println!("{input:?}");
Python::with_gil(|py| {
let parser = PyModule::from_code_bound(
py,
Expand Down
Loading