File tree 4 files changed +9
-9
lines changed
cap-primitives/src/rustix/linux/fs
4 files changed +9
-9
lines changed Original file line number Diff line number Diff line change @@ -982,7 +982,7 @@ impl DirExtUtf8 for cap_std::fs_utf8::Dir {
982
982
& self . as_filelike_view :: < std:: fs:: File > ( ) ,
983
983
path. as_ref ( ) . as_ref ( ) ,
984
984
) {
985
- Ok ( file) => Ok ( Self :: from_std_file ( file. into ( ) ) ) ,
985
+ Ok ( file) => Ok ( Self :: from_std_file ( file) ) ,
986
986
Err ( e) => Err ( e) ,
987
987
}
988
988
}
@@ -1045,7 +1045,7 @@ impl AsyncDirExtUtf8 for cap_async_std::fs_utf8::Dir {
1045
1045
spawn_blocking ( move || {
1046
1046
set_times (
1047
1047
& clone. as_filelike_view :: < std:: fs:: File > ( ) ,
1048
- & path,
1048
+ path,
1049
1049
Some ( atime) ,
1050
1050
None ,
1051
1051
)
@@ -1064,7 +1064,7 @@ impl AsyncDirExtUtf8 for cap_async_std::fs_utf8::Dir {
1064
1064
spawn_blocking ( move || {
1065
1065
set_times (
1066
1066
& clone. as_filelike_view :: < std:: fs:: File > ( ) ,
1067
- & path,
1067
+ path,
1068
1068
None ,
1069
1069
Some ( mtime) ,
1070
1070
)
@@ -1084,7 +1084,7 @@ impl AsyncDirExtUtf8 for cap_async_std::fs_utf8::Dir {
1084
1084
spawn_blocking ( move || {
1085
1085
set_times (
1086
1086
& clone. as_filelike_view :: < std:: fs:: File > ( ) ,
1087
- & path,
1087
+ path,
1088
1088
atime,
1089
1089
mtime,
1090
1090
)
@@ -1104,7 +1104,7 @@ impl AsyncDirExtUtf8 for cap_async_std::fs_utf8::Dir {
1104
1104
spawn_blocking ( move || {
1105
1105
set_times_nofollow (
1106
1106
& clone. as_filelike_view :: < std:: fs:: File > ( ) ,
1107
- & path,
1107
+ path,
1108
1108
atime,
1109
1109
mtime,
1110
1110
)
Original file line number Diff line number Diff line change @@ -336,7 +336,7 @@ impl PoolExt for Pool {
336
336
for addr in addrs {
337
337
self . _pool ( ) . check_addr ( & addr) ?;
338
338
339
- match rustix:: net:: connect ( & socket, & addr) {
339
+ match rustix:: net:: connect ( socket, & addr) {
340
340
Ok ( ( ) ) => return Ok ( ( ) ) ,
341
341
Err ( err) => last_err = Some ( err) ,
342
342
}
Original file line number Diff line number Diff line change @@ -37,7 +37,7 @@ pub(crate) fn open_impl(
37
37
// If we got anything other than a `ENOSYS` error, that's our result.
38
38
match result {
39
39
Err ( err) if err. raw_os_error ( ) == Some ( rustix:: io:: Errno :: NOSYS . raw_os_error ( ) ) => { }
40
- Err ( err) => return Err ( err. into ( ) ) ,
40
+ Err ( err) => return Err ( err) ,
41
41
Ok ( fd) => return Ok ( fd) ,
42
42
}
43
43
}
Original file line number Diff line number Diff line change @@ -71,9 +71,9 @@ impl TempDir {
71
71
pub fn new_in ( dir : & Dir ) -> io:: Result < Self > {
72
72
for _ in 0 ..Self :: num_iterations ( ) {
73
73
let name = & Self :: new_name ( ) ;
74
- match dir. create_dir ( & name) {
74
+ match dir. create_dir ( name) {
75
75
Ok ( ( ) ) => {
76
- let dir = match dir. open_dir ( & name) {
76
+ let dir = match dir. open_dir ( name) {
77
77
Ok ( dir) => dir,
78
78
Err ( e) => {
79
79
dir. remove_dir ( name) . ok ( ) ;
You can’t perform that action at this time.
0 commit comments