@@ -3072,7 +3072,6 @@ mod tests {
30723072 use crate :: build:: CheckoutBuilder ;
30733073 use crate :: { CherrypickOptions , FileMode , MergeFileInput } ;
30743074 use crate :: { ObjectType , Oid , Repository , ResetType } ;
3075- use std:: convert:: TryInto ;
30763075 use std:: ffi:: OsStr ;
30773076 use std:: fs;
30783077 use std:: io:: Write ;
@@ -3443,7 +3442,7 @@ mod tests {
34433442 let ancestor_content = ancestor_blob. content ( ) ;
34443443 let mut input = MergeFileInput :: new ( ) ;
34453444 input. path ( String :: from_utf8 ( ancestor. path ) . unwrap ( ) ) ;
3446- input. mode ( Some ( FileMode :: from ( ancestor. mode . try_into ( ) . unwrap ( ) ) ) ) ;
3445+ input. mode ( Some ( FileMode :: from_raw ( ancestor. mode ) ) ) ;
34473446 input. content ( Some ( & ancestor_content) ) ;
34483447 ancestor_input = Some ( input) ;
34493448 } else {
@@ -3456,7 +3455,7 @@ mod tests {
34563455 let ours_content = ours_blob. content ( ) ;
34573456 let mut input = MergeFileInput :: new ( ) ;
34583457 input. path ( String :: from_utf8 ( ours. path ) . unwrap ( ) ) ;
3459- input. mode ( Some ( FileMode :: from ( ours. mode . try_into ( ) . unwrap ( ) ) ) ) ;
3458+ input. mode ( Some ( FileMode :: from_raw ( ours. mode ) ) ) ;
34603459 input. content ( Some ( & ours_content) ) ;
34613460 ours_input = Some ( input) ;
34623461 } else {
@@ -3469,7 +3468,7 @@ mod tests {
34693468 let theirs_content = theirs_blob. content ( ) ;
34703469 let mut input = MergeFileInput :: new ( ) ;
34713470 input. path ( String :: from_utf8 ( theirs. path ) . unwrap ( ) ) ;
3472- input. mode ( Some ( FileMode :: from ( theirs. mode . try_into ( ) . unwrap ( ) ) ) ) ;
3471+ input. mode ( Some ( FileMode :: from_raw ( theirs. mode ) ) ) ;
34733472 input. content ( Some ( & theirs_content) ) ;
34743473 theirs_input = Some ( input) ;
34753474 } else {
0 commit comments