This is a breaking change, but I think it's justified for two reasons:
- It removes all unsafe code from this crate.
- FromRawFd is superseded by From<OwnedFd>
cc rust-secure-code/safety-dance#83
Signed-off-by: John Nunley <dev@notgull.net>
```
warning: the borrowed expression implements the required traits
--> src/lib.rs:74:43
|
74 | unblock(move || std::fs::canonicalize(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
warning: the borrowed expression implements the required traits
--> src/lib.rs:132:41
|
132 | unblock(move || std::fs::create_dir(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:154:45
|
154 | unblock(move || std::fs::create_dir_all(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:233:35
|
233 | unblock(move || std::fs::read(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:264:39
|
264 | unblock(move || std::fs::read_dir(&path).map(|inner| ReadDir(State::Idle(Some(inner))))).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:466:40
|
466 | unblock(move || std::fs::read_link(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:495:45
|
495 | unblock(move || std::fs::read_to_string(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:520:41
|
520 | unblock(move || std::fs::remove_dir(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:542:45
|
542 | unblock(move || std::fs::remove_dir_all(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:564:42
|
564 | unblock(move || std::fs::remove_file(&path)).await
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:874:56
|
874 | let file = unblock(move || std::fs::File::open(&path)).await?;
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
warning: the borrowed expression implements the required traits
--> src/lib.rs:905:58
|
905 | let file = unblock(move || std::fs::File::create(&path)).await?;
| ^^^^^ help: change this to: `path`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
```