@@ -52,7 +52,7 @@ impl Config {
5252 pub fn from_env_var ( name : & str ) -> Result < Config , Error > {
5353 let value = std:: env:: var ( name) . map_err ( |_| {
5454 Error :: new (
55- Kind :: ConfigError ( format ! ( "Couldn't find {} environment variable" , name ) ) ,
55+ Kind :: ConfigError ( format ! ( "Couldn't find {name } environment variable" ) ) ,
5656 None ,
5757 )
5858 } ) ?;
@@ -64,14 +64,14 @@ impl Config {
6464 pub fn from_file_location < T : AsRef < std:: path:: Path > > ( location : T ) -> Result < Config , Error > {
6565 let file = std:: fs:: read_to_string ( & location) . map_err ( |err| {
6666 Error :: new (
67- Kind :: ConfigError ( format ! ( "could not open config file, {}" , err ) ) ,
67+ Kind :: ConfigError ( format ! ( "could not open config file, {err}" ) ) ,
6868 None ,
6969 )
7070 } ) ?;
7171
7272 let mut config: Config = toml:: from_str ( & file) . map_err ( |err| {
7373 Error :: new (
74- Kind :: ConfigError ( format ! ( "could not parse config file, {}" , err ) ) ,
74+ Kind :: ConfigError ( format ! ( "could not parse config file, {err}" ) ) ,
7575 None ,
7676 )
7777 } ) ?;
@@ -99,7 +99,7 @@ impl Config {
9999
100100 let config_db_path = config_db_path. canonicalize ( ) . map_err ( |err| {
101101 Error :: new (
102- Kind :: ConfigError ( format ! ( "invalid sqlite db path, {}" , err ) ) ,
102+ Kind :: ConfigError ( format ! ( "invalid sqlite db path, {err}" ) ) ,
103103 None ,
104104 )
105105 } ) ?;
@@ -293,7 +293,7 @@ impl FromStr for Config {
293293 fn from_str ( url_str : & str ) -> Result < Config , Self :: Err > {
294294 let url = Url :: parse ( url_str) . map_err ( |_| {
295295 Error :: new (
296- Kind :: ConfigError ( format ! ( "Couldn't parse the string '{}' as a URL" , url_str ) ) ,
296+ Kind :: ConfigError ( format ! ( "Couldn't parse the string '{url_str }' as a URL" ) ) ,
297297 None ,
298298 )
299299 } ) ?;
@@ -365,7 +365,7 @@ cfg_if::cfg_if! {
365365
366366 if let Some ( port) = & config. main. db_port {
367367 let port = port. parse( ) . map_err( |_| Error :: new(
368- Kind :: ConfigError ( format!( "Couldn't parse value {} as mssql port" , port ) ) ,
368+ Kind :: ConfigError ( format!( "Couldn't parse value {port } as mssql port" ) ) ,
369369 None ,
370370 ) ) ?;
371371 tconfig. port( port) ;
0 commit comments