feat: scaffold out Trial::input API #319
clippy
10 warnings
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 0 |
Warning | 10 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.78.0 (9b00956e5 2024-04-29)
- cargo 1.78.0 (54d8815d0 2024-03-26)
- clippy 0.1.78 (9b00956 2024-04-29)
Annotations
Check warning on line 197 in src/trial/history.rs
github-actions / clippy
casting to the same type is unnecessary (`usize` -> `usize`)
warning: casting to the same type is unnecessary (`usize` -> `usize`)
--> src/trial/history.rs:197:37
|
197 | self.max_misalignment + col as usize
| ^^^^^^^^^^^^ help: try: `col`
|
= 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
Check warning on line 41 in src/config.rs
github-actions / clippy
this `impl` can be derived
warning: this `impl` can be derived
--> src/config.rs:37:1
|
37 | / impl Default for Theme {
38 | | fn default() -> Self {
39 | | Self {}
40 | | }
41 | | }
| |_^
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
= note: `#[warn(clippy::derivable_impls)]` on by default
= help: remove the manual implementation...
help: ...and instead derive it
|
35 + #[derive(Default)]
36 | pub struct Theme {}
|
Check warning on line 241 in src/trial/history.rs
github-actions / clippy
function `first_grapheme_cluster` is never used
warning: function `first_grapheme_cluster` is never used
--> src/trial/history.rs:241:4
|
241 | fn first_grapheme_cluster(string: &str) -> &str {
| ^^^^^^^^^^^^^^^^^^^^^^
Check warning on line 235 in src/trial/history.rs
github-actions / clippy
struct `EntryIndices` is never constructed
warning: struct `EntryIndices` is never constructed
--> src/trial/history.rs:235:8
|
235 | struct EntryIndices {
| ^^^^^^^^^^^^
Check warning on line 39 in src/trial/history.rs
github-actions / clippy
multiple associated items are never used
warning: multiple associated items are never used
--> src/trial/history.rs:39:12
|
37 | impl History {
| ------------ associated items in this implementation
38 | /// Creates a new history, with empty typed and reference strings.
39 | pub fn new(max_misalignment: usize) -> Self {
| ^^^
...
56 | pub fn push_reference(&mut self, reference: &str) {
| ^^^^^^^^^^^^^^
...
104 | fn push_typed(&mut self, typed: &str) {
| ^^^^^^^^^^
...
163 | const MATCH_COST: u32 = 0;
| ^^^^^^^^^^
...
167 | const MISMATCH_COST: u32 = 2;
| ^^^^^^^^^^^^^
168 | // An insertion or deletion requires one keystroke.
169 | const INSERTION_COST: u32 = 1;
| ^^^^^^^^^^^^^^
170 | const DELETION_COST: u32 = 1;
| ^^^^^^^^^^^^^
171 |
172 | fn tracked_entries_per_row(&self) -> usize {
| ^^^^^^^^^^^^^^^^^^^^^^^
...
176 | fn row_indices(&self, row: usize) -> impl Iterator<Item = EntryIndices> {
| ^^^^^^^^^^^
...
191 | fn col_indices(&self, col: usize) -> impl Iterator<Item = EntryIndices> {
| ^^^^^^^^^^^
...
219 | fn replacement_cost(&self, row: isize, col: isize) -> Option<u32> {
| ^^^^^^^^^^^^^^^^
Check warning on line 27 in src/trial/mod.rs
github-actions / clippy
associated items `new` and `process` are never used
warning: associated items `new` and `process` are never used
--> src/trial/mod.rs:27:12
|
25 | impl Trial {
| ---------- associated items in this implementation
26 | /// Create a new trial.
27 | pub fn new(env: &crate::Env) -> Self {
| ^^^
...
35 | pub fn process(&mut self, input: Input) {
| ^^^^^^^
Check warning on line 16 in src/trial/mod.rs
github-actions / clippy
enum `Input` is never used
warning: enum `Input` is never used
--> src/trial/mod.rs:16:10
|
16 | pub enum Input {
| ^^^^^
Check warning on line 6 in src/trial/mod.rs
github-actions / clippy
struct `Trial` is never constructed
warning: struct `Trial` is never constructed
--> src/trial/mod.rs:6:12
|
6 | pub struct Trial {
| ^^^^^
Check warning on line 110 in src/config.rs
github-actions / clippy
function `deserialize_color` is never used
warning: function `deserialize_color` is never used
--> src/config.rs:110:4
|
110 | fn deserialize_color<'de, D>(deserializer: D) -> Result<Color, D::Error>
| ^^^^^^^^^^^^^^^^^
Check warning on line 43 in src/config.rs
github-actions / clippy
function `deserialize_style` is never used
warning: function `deserialize_style` is never used
--> src/config.rs:43:4
|
43 | fn deserialize_style<'de, D>(deserializer: D) -> Result<Style, D::Error>
| ^^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default