@@ -125,7 +125,7 @@ fn baseurl(lang: &str) -> String {
125125 if lang == "en-US" {
126126 String :: new ( )
127127 } else {
128- format ! ( "/{}" , lang )
128+ format ! ( "/{lang}" )
129129 }
130130}
131131
@@ -274,13 +274,13 @@ fn hash_css(css: &str) -> String {
274274}
275275
276276fn compile_sass ( filename : & str ) -> String {
277- let scss_file = format ! ( "./src/styles/{}.scss" , filename ) ;
277+ let scss_file = format ! ( "./src/styles/{filename }.scss" ) ;
278278
279279 let css = compile_file ( & scss_file, Options :: default ( ) )
280280 . unwrap_or_else ( |_| panic ! ( "couldn't compile sass: {}" , & scss_file) ) ;
281281
282282 let css_sha = format ! ( "{}_{}" , filename, hash_css( & css) ) ;
283- let css_file = format ! ( "./static/styles/{}.css" , css_sha ) ;
283+ let css_file = format ! ( "./static/styles/{css_sha }.css" ) ;
284284
285285 fs:: write ( & css_file, css. into_bytes ( ) )
286286 . unwrap_or_else ( |_| panic ! ( "couldn't write css file: {}" , & css_file) ) ;
@@ -291,7 +291,7 @@ fn compile_sass(filename: &str) -> String {
291291fn concat_vendor_css ( files : Vec < & str > ) -> String {
292292 let mut concatted = String :: new ( ) ;
293293 for filestem in files {
294- let vendor_path = format ! ( "./static/styles/{}.css" , filestem ) ;
294+ let vendor_path = format ! ( "./static/styles/{filestem }.css" ) ;
295295 let contents = fs:: read_to_string ( vendor_path) . expect ( "couldn't read vendor css" ) ;
296296 concatted. push_str ( & contents) ;
297297 }
@@ -307,7 +307,7 @@ fn concat_vendor_css(files: Vec<&str>) -> String {
307307fn concat_app_js ( files : Vec < & str > ) -> String {
308308 let mut concatted = String :: new ( ) ;
309309 for filestem in files {
310- let vendor_path = format ! ( "./static/scripts/{}.js" , filestem ) ;
310+ let vendor_path = format ! ( "./static/scripts/{filestem }.js" ) ;
311311 let contents = fs:: read_to_string ( vendor_path) . expect ( "couldn't read app js" ) ;
312312 concatted. push_str ( & contents) ;
313313 }
@@ -354,7 +354,7 @@ async fn render_governance(
354354 Ok ( Template :: render ( page, context) )
355355 }
356356 Err ( err) => {
357- eprintln ! ( "error while loading the governance page: {}" , err ) ;
357+ eprintln ! ( "error while loading the governance page: {err}" ) ;
358358 Err ( Status :: InternalServerError )
359359 }
360360 }
@@ -377,7 +377,7 @@ async fn render_team(
377377 if err. is :: < teams:: TeamNotFound > ( ) {
378378 Err ( Status :: NotFound )
379379 } else {
380- eprintln ! ( "error while loading the team page: {}" , err ) ;
380+ eprintln ! ( "error while loading the team page: {err}" ) ;
381381 Err ( Status :: InternalServerError )
382382 }
383383 }
@@ -392,7 +392,7 @@ fn render_subject(category: Category, subject: &str, lang: String) -> Result<Tem
392392 // To work around the problem we check whether the template exists beforehand.
393393 let path = Path :: new ( "templates" )
394394 . join ( category. name ( ) )
395- . join ( format ! ( "{}.html.hbs" , subject ) ) ;
395+ . join ( format ! ( "{subject }.html.hbs" ) ) ;
396396 if !path. is_file ( ) {
397397 return Err ( Status :: NotFound ) ;
398398 }
0 commit comments