File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff 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 ) ;
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff 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}
Original file line number Diff line number Diff 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 ( )
Original file line number Diff line number Diff 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,
You can’t perform that action at this time.
0 commit comments