@@ -40,8 +40,7 @@ impl TryFrom<String> for Component {
4040 let install_path = parts
4141 . nth ( 1 )
4242 . ok_or ( format ! (
43- "Could not get full name of mod, from provided string: {}" ,
44- line
43+ "Could not get full name of mod, from provided string: {line}"
4544 ) ) ?
4645 . to_string ( ) ;
4746
@@ -51,8 +50,7 @@ impl TryFrom<String> for Component {
5150 . split ( '\\' )
5251 . next ( )
5352 . ok_or ( format ! (
54- "Could not split {} into mod into name and component" ,
55- line
53+ "Could not split {line} into mod into name and component"
5654 ) ) ?
5755 . to_ascii_lowercase ( ) ;
5856 ( windows_path. to_string ( ) , name)
@@ -61,42 +59,34 @@ impl TryFrom<String> for Component {
6159 . split ( '/' )
6260 . next ( )
6361 . ok_or ( format ! (
64- "Could not split {} into mod into name and component" ,
65- line
62+ "Could not split {line} into mod into name and component"
6663 ) ) ?
6764 . to_ascii_lowercase ( ) ;
6865 ( linux_path. to_string ( ) , name)
6966 } else {
70- return Err ( format ! (
71- "Could not find tp2 file name, from provided string: {}" ,
72- line
73- )
74- . into ( ) ) ;
67+ return Err (
68+ format ! ( "Could not find tp2 file name, from provided string: {line}" ) . into ( ) ,
69+ ) ;
7570 } ;
7671
7772 let mut tail = parts
7873 . next ( )
7974 . ok_or ( format ! (
80- "Could not find lang and component, from provided string {}" ,
81- line
75+ "Could not find lang and component, from provided string {line}"
8276 ) ) ?
8377 . split ( "//" ) ;
8478
8579 let mut lang_and_component = tail. next ( ) . unwrap_or_default ( ) . split ( ' ' ) ;
8680
8781 let lang = lang_and_component
8882 . nth ( 1 )
89- . ok_or ( format ! (
90- "Could not find lang, from provided string: {}" ,
91- line
92- ) ) ?
83+ . ok_or ( format ! ( "Could not find lang, from provided string: {line}" ) ) ?
9384 . replace ( '#' , "" ) ;
9485
9586 let component = lang_and_component
9687 . next ( )
9788 . ok_or ( format ! (
98- "Could not find component, from provided string {}" ,
99- line
89+ "Could not find component, from provided string {line}"
10090 ) ) ?
10191 . replace ( '#' , "" ) ;
10292
0 commit comments