@@ -167,7 +167,7 @@ impl LocalSource {
167167 for line in std:: fs:: read_to_string ( file)
168168 . map_err ( |err| IgnoreErrorKind :: ErrorGlob {
169169 file : file. into ( ) ,
170- err,
170+ source : err,
171171 } ) ?
172172 . lines ( )
173173 {
@@ -190,7 +190,7 @@ impl LocalSource {
190190 for line in std:: fs:: read_to_string ( file)
191191 . map_err ( |err| IgnoreErrorKind :: ErrorGlob {
192192 file : file. into ( ) ,
193- err,
193+ source : err,
194194 } ) ?
195195 . lines ( )
196196 {
@@ -260,8 +260,13 @@ impl ReadSourceOpen for OpenFile {
260260 /// [`IgnoreErrorKind::UnableToOpenFile`]: crate::error::IgnoreErrorKind::UnableToOpenFile
261261 fn open ( self ) -> RusticResult < Self :: Reader > {
262262 let path = self . 0 ;
263- File :: open ( & path)
264- . map_err ( |err| IgnoreErrorKind :: UnableToOpenFile { file : path, err } . into ( ) )
263+ File :: open ( & path) . map_err ( |err| {
264+ IgnoreErrorKind :: UnableToOpenFile {
265+ file : path,
266+ source : err,
267+ }
268+ . into ( )
269+ } )
265270 }
266271}
267272
@@ -329,7 +334,7 @@ impl Iterator for LocalSourceWalker {
329334 self . save_opts . with_atime ,
330335 self . save_opts . ignore_devid ,
331336 )
332- . map_err ( std :: convert :: Into :: into)
337+ . map_err ( Into :: into)
333338 } )
334339 }
335340}
@@ -410,7 +415,7 @@ fn map_entry(
410415 let path = entry. path ( ) ;
411416 let target = read_link ( path) . map_err ( |err| IgnoreErrorKind :: ErrorLink {
412417 path : path. to_path_buf ( ) ,
413- err,
418+ source : err,
414419 } ) ?;
415420 let node_type = NodeType :: from_link ( & target) ;
416421 Node :: new_node ( name, node_type, meta)
@@ -535,15 +540,15 @@ fn map_entry(
535540 xattr:: list ( path)
536541 . map_err ( |err| IgnoreErrorKind :: ErrorXattr {
537542 path : path. to_path_buf ( ) ,
538- err,
543+ source : err,
539544 } ) ?
540545 . map ( |name| {
541546 Ok ( ExtendedAttribute {
542547 name : name. to_string_lossy ( ) . to_string ( ) ,
543548 value : xattr:: get ( path, name)
544549 . map_err ( |err| IgnoreErrorKind :: ErrorXattr {
545550 path : path. to_path_buf ( ) ,
546- err,
551+ source : err,
547552 } ) ?
548553 . unwrap ( ) ,
549554 } )
@@ -574,7 +579,7 @@ fn map_entry(
574579 let path = entry. path ( ) ;
575580 let target = read_link ( path) . map_err ( |err| IgnoreErrorKind :: ErrorLink {
576581 path : path. to_path_buf ( ) ,
577- err,
582+ source : err,
578583 } ) ?;
579584 let node_type = NodeType :: from_link ( & target) ;
580585 Node :: new_node ( name, node_type, meta)
0 commit comments