fire: Add early returns #1180
clippy
5 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 5 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.73.0 (cc66ad468 2023-10-03)
- cargo 1.73.0 (9c4383fb5 2023-08-26)
- clippy 0.1.73 (cc66ad4 2023-10-03)
Annotations
Check failure on line 270 in fire/src/lib.rs
github-actions / clippy
called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
error: called `map(f)` on an `Option` value where `f` is a closure that returns the unit type `()`
--> fire/src/lib.rs:267:9
|
267 | // to_run.map(|block| {
268 | || self.fire_node_ref(block);
269 | || self.gc.transfer(block, node.origin)
270 | || });
| ||__________^- help: try: `if let Some(block) = to_run { ... }`
| |__________|
|
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#option_map_unit_fn
= note: `-D clippy::option-map-unit-fn` implied by `-D warnings`
Check failure on line 241 in fire/src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> fire/src/lib.rs:241:24
|
241 | self.fire_node(&self.access(node_ref))
| ^^^^^^^^^^^^^^^^^^^^^^ help: change this to: `self.access(node_ref)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 182 in fire/src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> fire/src/lib.rs:182:55
|
182 | let result = self.perform_extern_call(&def, args);
| ^^^^ help: change this to: `def`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 175 in fire/src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> fire/src/lib.rs:175:28
|
175 | self.fire_node(&self.access(arg));
| ^^^^^^^^^^^^^^^^^ help: change this to: `self.access(arg)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
Check failure on line 141 in fire/src/lib.rs
github-actions / clippy
this expression creates a reference which is immediately dereferenced by the compiler
error: this expression creates a reference which is immediately dereferenced by the compiler
--> fire/src/lib.rs:141:28
|
141 | self.fire_node(&self.access(node));
| ^^^^^^^^^^^^^^^^^^ help: change this to: `self.access(node)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `-D clippy::needless-borrow` implied by `-D warnings`