File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -38,10 +38,10 @@ impl MessageBuilder {
3838 }
3939
4040 pub fn set_body ( & mut self , body : & str ) {
41- self . message . push_str ( format ! ( "\n \n {}" , body ) . as_str ( ) ) ;
41+ self . message . push_str ( format ! ( "\n \n {body}" ) . as_str ( ) ) ;
4242 }
4343
4444 pub fn set_footer ( & mut self , footer : & str ) {
45- self . message . push_str ( format ! ( "\n \n {}" , footer ) . as_str ( ) ) ;
45+ self . message . push_str ( format ! ( "\n \n {footer}" ) . as_str ( ) ) ;
4646 }
4747}
Original file line number Diff line number Diff line change @@ -25,15 +25,15 @@ impl Prompt {
2525 pub fn optional_input ( & self , prompt : & str , label : & str ) -> Result < String > {
2626 let input = Text :: new ( prompt)
2727 . with_render_config ( self . config )
28- . with_help_message ( format ! ( "{}. Press Enter to skip" , label ) . as_str ( ) )
28+ . with_help_message ( format ! ( "{label }. Press Enter to skip" ) . as_str ( ) )
2929 . prompt ( ) ?;
3030 Ok ( input)
3131 }
3232
3333 pub fn required_input ( & self , prompt : & str , label : & str ) -> Result < String > {
3434 let input = Text :: new ( prompt)
3535 . with_render_config ( self . config )
36- . with_validator ( required ! ( format!( "{} can't be empty" , label ) . as_str( ) ) )
36+ . with_validator ( required ! ( format!( "{label } can't be empty" ) . as_str( ) ) )
3737 . prompt ( ) ?;
3838 Ok ( input)
3939 }
Original file line number Diff line number Diff line change @@ -93,7 +93,7 @@ fn get_config_path() -> Result<PathBuf> {
9393pub fn get_pattern ( config_path : Option < PathBuf > ) -> Result < CommitPattern > {
9494 let default_pattern_str = DEFAULT_CONFIG_FILE ;
9595 let selected_config_path = select_custom_config_path ( config_path) ?;
96- let pattern_str = get_config_path_content ( & selected_config_path)
96+ let pattern_str = get_config_path_content ( selected_config_path)
9797 . unwrap_or_else ( |_| default_pattern_str. to_owned ( ) ) ;
9898 serde_json:: from_str ( & pattern_str) . context ( "Failed to parse commit pattern from file" )
9999}
You can’t perform that action at this time.
0 commit comments