spcasm: remove unneeded pin #763
clippy
18 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 18 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.84.0-nightly (ee612c45f 2024-11-19)
- cargo 1.84.0-nightly (69e595908 2024-11-16)
- clippy 0.1.84 (ee612c45f0 2024-11-19)
Annotations
Check failure on line 662 in src/sema/reference.rs
github-actions / clippy
it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
--> src/sema/reference.rs:658:2
|
658 | / fn set_current_label(
659 | | &mut self,
660 | | current_label: &Option<Arc<RwLock<Label>>>,
| | --------------------------- help: change this to: `Option<&Arc<RwLock<Label>>>`
661 | | source_code: &Arc<AssemblyCode>,
662 | | ) -> Result<(), Box<AssemblyError>>;
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option
= note: `-D clippy::ref-option` implied by `-D clippy::pedantic`
= help: to override `-D clippy::pedantic` add `#[allow(clippy::ref_option)]`
Check failure on line 248 in src/sema/instruction.rs
github-actions / clippy
this `map_or` is redundant
error: this `map_or` is redundant
--> src/sema/instruction.rs:248:7
|
248 | || self.second_operand.clone().map_or(false, AddressingMode::has_long_address)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `self.second_operand.clone().is_some_and(AddressingMode::has_long_address)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
Check failure on line 247 in src/sema/instruction.rs
github-actions / clippy
this `map_or` is redundant
error: this `map_or` is redundant
--> src/sema/instruction.rs:247:3
|
247 | self.first_operand.clone().map_or(false, AddressingMode::has_long_address)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `self.first_operand.clone().is_some_and(AddressingMode::has_long_address)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-D clippy::unnecessary-map-or` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
Check failure on line 76 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:76:48
|
76 | ... segments.directive_parameters.pad_value.get_or_insert_default().size =
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 73 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:73:49
|
73 | ... segments.directive_parameters.fill_value.get_or_insert_default().size =
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 71 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:71:48
|
71 | ... segments.directive_parameters.pad_value.get_or_insert_default().value = value.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 69 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:69:49
|
69 | ... segments.directive_parameters.fill_value.get_or_insert_default().value = value.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
= note: `-D clippy::incompatible-msrv` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::incompatible_msrv)]`
Check failure on line 508 in src/brr/mod.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> src/brr/mod.rs:508:29
|
508 | for (index, byte) in bytes.into_iter().enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::into_iter_on_ref)]`
Check failure on line 33 in src/assembler/directive.rs
github-actions / clippy
writing `&Vec` instead of `&[_]` involves a new object where a slice will do
error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/assembler/directive.rs:33:19
|
33 | current_labels: &Vec<Reference>,
| ^^^^^^^^^^^^^^^ help: change this to: `&[Reference]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `-D clippy::ptr-arg` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::ptr_arg)]`
Check failure on line 662 in src/sema/reference.rs
github-actions / clippy
it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
error: it is more idiomatic to use `Option<&T>` instead of `&Option<T>`
--> src/sema/reference.rs:658:2
|
658 | / fn set_current_label(
659 | | &mut self,
660 | | current_label: &Option<Arc<RwLock<Label>>>,
| | --------------------------- help: change this to: `Option<&Arc<RwLock<Label>>>`
661 | | source_code: &Arc<AssemblyCode>,
662 | | ) -> Result<(), Box<AssemblyError>>;
| |________________________________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ref_option
= note: `-D clippy::ref-option` implied by `-D clippy::pedantic`
= help: to override `-D clippy::pedantic` add `#[allow(clippy::ref_option)]`
Check failure on line 248 in src/sema/instruction.rs
github-actions / clippy
this `map_or` is redundant
error: this `map_or` is redundant
--> src/sema/instruction.rs:248:7
|
248 | || self.second_operand.clone().map_or(false, AddressingMode::has_long_address)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `self.second_operand.clone().is_some_and(AddressingMode::has_long_address)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
Check failure on line 247 in src/sema/instruction.rs
github-actions / clippy
this `map_or` is redundant
error: this `map_or` is redundant
--> src/sema/instruction.rs:247:3
|
247 | self.first_operand.clone().map_or(false, AddressingMode::has_long_address)
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: use is_some_and instead: `self.first_operand.clone().is_some_and(AddressingMode::has_long_address)`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_map_or
= note: `-D clippy::unnecessary-map-or` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::unnecessary_map_or)]`
Check failure on line 76 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:76:48
|
76 | ... segments.directive_parameters.pad_value.get_or_insert_default().size =
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 73 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:73:49
|
73 | ... segments.directive_parameters.fill_value.get_or_insert_default().size =
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 71 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:71:48
|
71 | ... segments.directive_parameters.pad_value.get_or_insert_default().value = value.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
Check failure on line 69 in src/directive.rs
github-actions / clippy
current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
error: current MSRV (Minimum Supported Rust Version) is `1.80.0` but this item is stable since `1.83.0`
--> src/directive.rs:69:49
|
69 | ... segments.directive_parameters.fill_value.get_or_insert_default().value = value.clone(),
| ^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#incompatible_msrv
= note: `-D clippy::incompatible-msrv` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::incompatible_msrv)]`
Check failure on line 508 in src/brr/mod.rs
github-actions / clippy
this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
error: this `.into_iter()` call is equivalent to `.iter()` and will not consume the `slice`
--> src/brr/mod.rs:508:29
|
508 | for (index, byte) in bytes.into_iter().enumerate() {
| ^^^^^^^^^ help: call directly: `iter`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#into_iter_on_ref
= note: `-D clippy::into-iter-on-ref` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::into_iter_on_ref)]`
Check failure on line 33 in src/assembler/directive.rs
github-actions / clippy
writing `&Vec` instead of `&[_]` involves a new object where a slice will do
error: writing `&Vec` instead of `&[_]` involves a new object where a slice will do
--> src/assembler/directive.rs:33:19
|
33 | current_labels: &Vec<Reference>,
| ^^^^^^^^^^^^^^^ help: change this to: `&[Reference]`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#ptr_arg
= note: `-D clippy::ptr-arg` implied by `-D clippy::all`
= help: to override `-D clippy::all` add `#[allow(clippy::ptr_arg)]`