Add virtual runtime (FS only) #27
Annotations
328 warnings
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
lint (ubuntu-latest, --all-features, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
lint (ubuntu-latest, --all-features, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
lint (macos-latest, --all-features, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
lint (macos-latest, --all-features, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
lint (ubuntu-latest, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
lint (macos-latest, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
lint (windows-latest, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
redundant guard:
mfio-rt/src/util.rs#L44
warning: redundant guard
--> mfio-rt/src/util.rs:44:39
|
44 | (Some(_), Some(b)) if b == Component::ParentDir => return None,
| ^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
help: try
|
44 - (Some(_), Some(b)) if b == Component::ParentDir => return None,
44 + (Some(_), Some(Component::ParentDir)) => return None,
|
|
redundant guard:
mfio-rt/src/util.rs#L43
warning: redundant guard
--> mfio-rt/src/util.rs:43:39
|
43 | (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
| ^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_guards
= note: `#[warn(clippy::redundant_guards)]` on by default
help: try
|
43 - (Some(a), Some(b)) if b == Component::CurDir => comps.push(a),
43 + (Some(a), Some(Component::CurDir)) => comps.push(a),
|
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:71
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^ help: try: `*IOV_MAX`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
|
casting to the same type is unnecessary (`usize` -> `usize`):
mfio-rt/src/native/impls/io_uring/tcp_stream.rs#L115
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> mfio-rt/src/native/impls/io_uring/tcp_stream.rs:115:49
|
115 | msg.msg_iovlen = core::cmp::min(queue.len() as usize, *IOV_MAX as usize) as _;
| ^^^^^^^^^^^^^^^^^^^^ help: try: `queue.len()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_cast
= note: `#[warn(clippy::unnecessary_cast)]` on by default
|
lint (ubuntu-latest, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
lint (windows-latest, --all-features, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try this
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L764
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:764:34
|
764 | seq(run.writes_equal_rel(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L759
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:759:30
|
759 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L737
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:737:38
|
737 | seq(run.writes_equal_rel(&tdir2)),
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L736
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:736:34
|
736 | seq(run.writes_equal(&tdir)),
| ^^^^^ help: change this to: `tdir`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L725
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:725:34
|
725 | seq(run.writes_equal_rel(&tdir2)).await;
| ^^^^^^ help: change this to: `tdir2`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
|
this expression creates a reference which is immediately dereferenced by the compiler:
mfio-rt/src/test_suite.rs#L724
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> mfio-rt/src/test_suite.rs:724:30
|
724 | seq(run.writes_equal(&tdir)).await;
| ^^^^^ help: change this to: `tdir`
|
= 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
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L1064
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:1064:9
|
1064 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L949
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:949:24
|
949 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
950 | | id: Some(id),
951 | | parent_link: None,
952 | | entry: InodeData::Dir(VirtDirInner {
... |
955 | | metadata: Metadata::empty_dir(Permissions {}, None),
956 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L858
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:858:30
|
858 | new_entry.insert(Arc::new(RwLock::new(Inode {
| ______________________________^
859 | | id: Some(id),
860 | | parent_link: Some(ParentLink {
861 | | parent: parent_id,
... |
865 | | metadata,
866 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L841
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:841:24
|
841 | let root_dir = Arc::new(RwLock::new(Inode {
| ________________________^
842 | | id: Some(id),
843 | | parent_link: None,
844 | | entry: InodeData::Dir(VirtDirInner {
... |
847 | | metadata: Metadata::empty_dir(Permissions {}, None),
848 | | }));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`:
mfio-rt/src/virt/mod.rs#L689
warning: using `Result.and_then(|x| Ok(y))`, which is more succinctly expressed as `map(|x| y)`
--> mfio-rt/src/virt/mod.rs:689:19
|
689 | let ret = inode
| ___________________^
690 | | // TODO: do we want to filter here, since we are returning None later anyways. The only
691 | | // difference here is that we are doing so with read-only lock.
692 | | .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
... |
698 | | })
699 | | });
| |______________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map
= note: `#[warn(clippy::bind_instead_of_map)]` on by default
help: try this
|
689 ~ let ret = inode
690 + // TODO: do we want to filter here, since we are returning None later anyways. The only
691 + // difference here is that we are doing so with read-only lock.
692 + .filter(|dir| matches!(dir.read().entry, InodeData::Dir(_)))
693 + .ok_or(mferr!(Directory, NotFound, Filesystem)).map(|inode| VirtDir {
694 + inode,
695 + fs: self.fs.clone(),
696 ~ });
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L609
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:609:26
|
609 | new_entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
610 | | entry: InodeData::File(VirtFileInner {
611 | | data: from_file.data.clone(),
612 | | }),
... |
619 | | metadata: from.metadata.clone(),
620 | | })));
| |___________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L421
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:421:37
|
421 | ... .insert(Arc::new(RwLock::new(Inode {
| _______________________________^
422 | | ... id: Some(id),
423 | | ... parent_link: Some(ParentLink { parent, name }),
424 | | ... entry: InodeData::Dir(VirtDirInner {
... |
427 | | ... metadata: Metadata::empty_dir(Permissions {}, None),
428 | | ... })))
| |_________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
this loop could be written as a `for` loop:
mfio-rt/src/virt/mod.rs#L378
warning: this loop could be written as a `for` loop
--> mfio-rt/src/virt/mod.rs:378:9
|
378 | while let Some(component) = components.next() {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `for component in components`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#while_let_on_iterator
= note: `#[warn(clippy::while_let_on_iterator)]` on by default
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L354
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:354:26
|
354 | entry.insert(Arc::new(RwLock::new(Inode {
| __________________________^
355 | | id: Some(id),
356 | | metadata: Metadata::empty_dir(Permissions {}, None),
357 | | entry: InodeData::Dir(VirtDirInner {
... |
363 | | }),
364 | | })));
| |_______________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
unneeded `return` statement:
mfio-rt/src/virt/mod.rs#L348
warning: unneeded `return` statement
--> mfio-rt/src/virt/mod.rs:348:13
|
348 | return Err(mferr!(Directory, AlreadyExists, Filesystem));
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_return
= note: `#[warn(clippy::needless_return)]` on by default
help: remove `return`
|
348 - return Err(mferr!(Directory, AlreadyExists, Filesystem));
348 + Err(mferr!(Directory, AlreadyExists, Filesystem))
|
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L164
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:164:33
|
164 | .insert(Arc::new(RwLock::new(Inode {
| _________________________________^
165 | | id: Some(id),
166 | | parent_link: Some(ParentLink {
167 | | name: name.clone(),
... |
171 | | metadata: Metadata::empty_file(Permissions {}, None),
172 | | })))
| |___________________________^
|
= note: the trait `Sync` is not implemented for `RwLock<Inode>`
= note: required for `Arc<RwLock<Inode>>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
|
usage of an `Arc` that is not `Send` or `Sync`:
mfio-rt/src/virt/mod.rs#L108
warning: usage of an `Arc` that is not `Send` or `Sync`
--> mfio-rt/src/virt/mod.rs:108:23
|
108 | Self::from_fs(Arc::new(VirtFs::default()))
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: the trait `Send` is not implemented for `VirtFs`
= note: the trait `Sync` is not implemented for `VirtFs`
= note: required for `Arc<VirtFs>` to implement `Send` and `Sync`
= help: consider using an `Rc` instead or wrapping the inner type with a `Mutex`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#arc_with_non_send_sync
= note: `#[warn(clippy::arc_with_non_send_sync)]` on by default
|
you should consider adding a `Default` implementation for `VirtRt`:
mfio-rt/src/virt/mod.rs#L63
warning: you should consider adding a `Default` implementation for `VirtRt`
--> mfio-rt/src/virt/mod.rs:63:5
|
63 | / pub fn new() -> Self {
64 | | Self {
65 | | cwd: VirtDir::default(),
66 | | backend: BackendContainer::new_dyn(pending()),
67 | | }
68 | | }
| |_____^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#new_without_default
= note: `#[warn(clippy::new_without_default)]` on by default
help: try adding this
|
62 + impl Default for VirtRt {
63 + fn default() -> Self {
64 + Self::new()
65 + }
66 + }
|
|
associated function `null` is never used:
mfio-rt/src/util.rs#L128
warning: associated function `null` is never used
--> mfio-rt/src/util.rs:128:12
|
127 | impl RawBox {
| ----------- associated function in this implementation
128 | pub fn null() -> Self {
| ^^^^
|
function `new_socket` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L19
warning: function `new_socket` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:19:15
|
19 | pub(crate) fn new_socket(
| ^^^^^^^^^^
|
function `new_for_addr` is never used:
mfio-rt/src/native/impls/unix_extra.rs#L7
warning: function `new_for_addr` is never used
--> mfio-rt/src/native/impls/unix_extra.rs:7:15
|
7 | pub(crate) fn new_for_addr(
| ^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
|
useless conversion to the same type: `io::packet::FullPacket<T, Perms>`:
mfio/src/io/packet/mod.rs#L1064
warning: useless conversion to the same type: `io::packet::FullPacket<T, Perms>`
--> mfio/src/io/packet/mod.rs:1064:9
|
1064 | self.into()
| ^^^^^^^^^^^ help: consider removing `.into()`: `self`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#useless_conversion
= note: `#[warn(clippy::useless_conversion)]` on by default
|
lint (macos-latest, --cfg mfio_assume_linear_types --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
lint (windows-latest, --all-features, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
lint (windows-latest, --cfg tokio_unstable)
The following actions uses node12 which is deprecated and will be forced to run on node16: actions/checkout@v2, actions-rs/clippy-check@v1. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|