@@ -24,7 +24,6 @@ impl Dot {
2424 & self ,
2525 vars : & Variables ,
2626 auto_ignored : Vec < PathBuf > ,
27- profiles : & [ String ] ,
2827 ) -> Result < LinkResult > {
2928 let source = & self . source ( ) ?;
3029 let target = & self . copy_path_unchecked ( ) ;
@@ -47,7 +46,7 @@ impl Dot {
4746 }
4847
4948 // Recursively copy dotfile to .dots directory
50- self . traverse_and_copy ( source, target, ignored_paths. as_slice ( ) , & vars, profiles )
49+ self . traverse_and_copy ( source, target, ignored_paths. as_slice ( ) , & vars)
5150 }
5251
5352 fn load_local_vars ( source : & Path ) -> Variables {
@@ -73,7 +72,6 @@ impl Dot {
7372 target : & PathBuf ,
7473 ignored : & [ PathBuf ] ,
7574 vars : & Variables ,
76- profiles : & [ String ] ,
7775 ) -> Result < LinkResult > {
7876 if ignored. contains ( source) {
7977 return Ok ( LinkResult :: Ignored {
@@ -85,7 +83,7 @@ impl Dot {
8583 if source. is_file ( ) {
8684 fs:: create_dir_all ( target. parent ( ) . unwrap ( ) ) ?;
8785
88- match vars. to_dot ( source, profiles ) {
86+ match vars. to_dot ( source) {
8987 Ok ( content) if target. exists ( ) => self . update ( source, target, content) ,
9088 Ok ( content) => self . create ( source, target, content) ,
9189 Err ( e) if target. exists ( ) => {
@@ -95,10 +93,10 @@ impl Dot {
9593 // Those should be symlinked directly once this is implemented
9694 // https://github.com/oknozor/toml-bombadil/issues/138
9795 }
98- ErrorKind :: Msg ( message) => println ! ( "\t {}" , message. red( ) ) ,
9996 _ => {
10097 if let Some ( source) = e. source ( ) {
101- println ! ( "\t {}" , source) ;
98+ let message = format ! ( "{source}" ) ;
99+ println ! ( "{}" , message. red( ) ) ;
102100 }
103101 }
104102 }
@@ -124,7 +122,6 @@ impl Dot {
124122 & target. join ( entry_name) ,
125123 ignored,
126124 vars,
127- & [ ] ,
128125 ) ;
129126
130127 match result {
@@ -401,7 +398,6 @@ mod tests {
401398 & PathBuf :: from ( "dotfiles_with_multiple_nested_dir/.dots/dir" ) ,
402399 & [ ] ,
403400 & Variables :: default ( ) ,
404- & [ ] ,
405401 ) ?;
406402
407403 run_cmd ! ( tree -a; ) ?;
@@ -435,7 +431,6 @@ mod tests {
435431 & PathBuf :: from ( "dotfiles_non_utf8/.dots/ferris.png" ) ,
436432 & [ ] ,
437433 & Variables :: default ( ) ,
438- & [ ] ,
439434 ) ?;
440435
441436 run_cmd ! ( tree -a; ) ?;
@@ -475,7 +470,6 @@ mod tests {
475470 PathBuf :: from ( "source_dot/file.md" ) ,
476471 ] ,
477472 & Variables :: default ( ) ,
478- & [ ] ,
479473 ) ?;
480474
481475 // Assert
@@ -537,7 +531,7 @@ mod tests {
537531 vars : Dot :: default_vars ( ) ,
538532 } ;
539533
540- dot. install ( & Variables :: default ( ) , vec ! [ ] , & [ ] ) ?;
534+ dot. install ( & Variables :: default ( ) , vec ! [ ] ) ?;
541535
542536 assert_that ! ( PathBuf :: from( ".dots" ) ) . exists ( ) ;
543537 assert_that ! ( PathBuf :: from( ".dots/source_dot" ) ) . exists ( ) ;
@@ -561,7 +555,7 @@ mod tests {
561555 let vars: Variables = toml:: from_str ( r#"name = "Tom Bombadil""# ) ?;
562556
563557 // Act
564- dot. install ( & vars, vec ! [ ] , & [ ] ) ?;
558+ dot. install ( & vars, vec ! [ ] ) ?;
565559 let dot = PathBuf :: from ( ".dots/dotfiles/dot" ) ;
566560
567561 // Assert
@@ -598,7 +592,7 @@ mod tests {
598592 vars : PathBuf :: from ( "my_vars.toml" ) ,
599593 } ;
600594
601- dot. install ( & Variables :: default ( ) , vec ! [ ] , & [ ] ) ?;
595+ dot. install ( & Variables :: default ( ) , vec ! [ ] ) ?;
602596
603597 let content = fs:: read_to_string ( ".dots/dir/template" ) ?;
604598 assert_that ! ( content) . is_equal_to ( & "Hello Tom\n " . to_string ( ) ) ;
@@ -629,7 +623,7 @@ mod tests {
629623 } ;
630624
631625 // Arrange
632- dot. install ( & Variables :: default ( ) , vec ! [ ] , & [ ] ) ?;
626+ dot. install ( & Variables :: default ( ) , vec ! [ ] ) ?;
633627
634628 // Assert
635629 let content = fs:: read_to_string ( PathBuf :: from (
0 commit comments