@@ -3072,7 +3072,6 @@ mod tests {
3072
3072
use crate :: build:: CheckoutBuilder ;
3073
3073
use crate :: { CherrypickOptions , FileMode , MergeFileInput } ;
3074
3074
use crate :: { ObjectType , Oid , Repository , ResetType } ;
3075
- use std:: convert:: TryInto ;
3076
3075
use std:: ffi:: OsStr ;
3077
3076
use std:: fs;
3078
3077
use std:: io:: Write ;
@@ -3443,7 +3442,7 @@ mod tests {
3443
3442
let ancestor_content = ancestor_blob. content ( ) ;
3444
3443
let mut input = MergeFileInput :: new ( ) ;
3445
3444
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 ) ) ) ;
3447
3446
input. content ( Some ( & ancestor_content) ) ;
3448
3447
ancestor_input = Some ( input) ;
3449
3448
} else {
@@ -3456,7 +3455,7 @@ mod tests {
3456
3455
let ours_content = ours_blob. content ( ) ;
3457
3456
let mut input = MergeFileInput :: new ( ) ;
3458
3457
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 ) ) ) ;
3460
3459
input. content ( Some ( & ours_content) ) ;
3461
3460
ours_input = Some ( input) ;
3462
3461
} else {
@@ -3469,7 +3468,7 @@ mod tests {
3469
3468
let theirs_content = theirs_blob. content ( ) ;
3470
3469
let mut input = MergeFileInput :: new ( ) ;
3471
3470
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 ) ) ) ;
3473
3472
input. content ( Some ( & theirs_content) ) ;
3474
3473
theirs_input = Some ( input) ;
3475
3474
} else {
0 commit comments