add readconfig state #193
Annotations
6 warnings
associated function `new` is never used:
mfm_core/src/states/mod.rs#L19
warning: associated function `new` is never used
--> mfm_core/src/states/mod.rs:19:8
|
18 | impl ReadConfig {
| --------------- associated function in this implementation
19 | fn new() -> Self {
| ^^^
|
= note: `#[warn(dead_code)]` on by default
|
unused `std::result::Result` that must be used:
mfm_machine/src/state_machine/mod.rs#L140
warning: unused `std::result::Result` that must be used
--> mfm_machine/src/state_machine/mod.rs:140:9
|
140 | / self.tracker.as_mut().track(
141 | | Index::new(next_state_index, state.label(), state.tags()),
142 | | context.clone(),
143 | | );
| |_________^
|
= note: this `Result` may be an `Err` variant, which should be handled
= note: `#[warn(unused_must_use)]` on by default
help: use `let _ = ...` to ignore the resulting value
|
140 | let _ = self.tracker.as_mut().track(
| +++++++
|
struct `TrackerHistory` has a public `len` method, but no `is_empty` method:
mfm_machine/src/state_machine/tracker.rs#L36
warning: struct `TrackerHistory` has a public `len` method, but no `is_empty` method
--> mfm_machine/src/state_machine/tracker.rs:36:5
|
36 | pub fn len(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#len_without_is_empty
= note: `#[warn(clippy::len_without_is_empty)]` on by default
|
you should consider adding a `Default` implementation for `TrackerHistory`:
mfm_machine/src/state_machine/tracker.rs#L32
warning: you should consider adding a `Default` implementation for `TrackerHistory`
--> mfm_machine/src/state_machine/tracker.rs:32:5
|
32 | / pub fn new() -> Self {
33 | | TrackerHistory(Vec::new())
34 | | }
| |_____^
|
= 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
|
31 + impl Default for TrackerHistory {
32 + fn default() -> Self {
33 + Self::new()
34 + }
35 + }
|
|
`.map().collect()` can be replaced with `.try_for_each()`:
mfm_machine/src/state_machine/tracker.rs#L18
warning: `.map().collect()` can be replaced with `.try_for_each()`
--> mfm_machine/src/state_machine/tracker.rs:18:9
|
18 | / self.0
19 | | .iter()
20 | | .map(|(history_id, index, _)| {
21 | | writeln!(
... |
26 | | })
27 | | .collect()
| |______________________^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_collect_result_unit
= note: `#[warn(clippy::map_collect_result_unit)]` on by default
help: try
|
18 ~ self.0
19 + .iter().try_for_each(|(history_id, index, _)| {
20 + writeln!(
21 + f,
22 + "history_id ({}); index ({:?}); context (ptr)",
23 + history_id, index
24 + )
25 + })
|
|
build
The following actions uses node12 which is deprecated and will be forced to run on node16: 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/
|