refactor(crate): Introduce Word scruct to handle more info about words #373
clippy
25 errors
Details
Results
Message level | Amount |
---|---|
Internal compiler error | 0 |
Error | 25 |
Warning | 0 |
Note | 0 |
Help | 0 |
Versions
- rustc 1.82.0 (f6e511eec 2024-10-15)
- cargo 1.82.0 (8f40fc59f 2024-08-21)
- clippy 0.1.82 (f6e511e 2024-10-15)
Annotations
Check failure on line 9 in src/tr.rs
github-actions / clippy
unused import: `unicode_titlecase::StrTitleCase`
error: unused import: `unicode_titlecase::StrTitleCase`
--> src/tr.rs:9:5
|
9 | use unicode_titlecase::StrTitleCase;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 9 in src/en.rs
github-actions / clippy
unused import: `unicode_titlecase::StrTitleCase`
error: unused import: `unicode_titlecase::StrTitleCase`
--> src/en.rs:9:5
|
9 | use unicode_titlecase::StrTitleCase;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Check failure on line 8 in src/tr.rs
github-actions / clippy
unused import: `unicode_titlecase::tr_az::StrTrAzCasing`
error: unused import: `unicode_titlecase::tr_az::StrTrAzCasing`
--> src/tr.rs:8:5
|
8 | use unicode_titlecase::tr_az::StrTrAzCasing;
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
|
= note: `-D unused-imports` implied by `-D warnings`
= help: to override `-D warnings` add `#[allow(unused_imports)]`
Check failure on line 76 in src/tr.rs
github-actions / clippy
no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:76:19
|
76 | s.to_lowercase_tr_az()
| ^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `to_lowercase_tr_az`, perhaps you need to implement one of them:
candidate #1: `unicode_titlecase::tr_az::StrTrAzCasing`
candidate #2: `unicode_titlecase::tr_az::TrAzCasing`
Check failure on line 74 in src/tr.rs
github-actions / clippy
no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:74:19
|
74 | s.to_titlecase_tr_or_az_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_tr_or_az_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 61 in src/tr.rs
github-actions / clippy
no method named `to_uppercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_uppercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:61:20
|
61 | *s = s.to_uppercase_tr_az()
| ^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `to_uppercase_tr_az`, perhaps you need to implement one of them:
candidate #1: `unicode_titlecase::tr_az::StrTrAzCasing`
candidate #2: `unicode_titlecase::tr_az::TrAzCasing`
Check failure on line 51 in src/tr.rs
github-actions / clippy
no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:51:20
|
51 | *s = s.to_lowercase_tr_az()
| ^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `to_lowercase_tr_az`, perhaps you need to implement one of them:
candidate #1: `unicode_titlecase::tr_az::StrTrAzCasing`
candidate #2: `unicode_titlecase::tr_az::TrAzCasing`
Check failure on line 30 in src/tr.rs
github-actions / clippy
no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:30:32
|
30 | false => s.to_titlecase_tr_or_az_lower_rest(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_tr_or_az_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 29 in src/tr.rs
github-actions / clippy
no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase_tr_az` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:29:31
|
29 | true => s.to_lowercase_tr_az(),
| ^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following traits define an item `to_lowercase_tr_az`, perhaps you need to implement one of them:
candidate #1: `unicode_titlecase::tr_az::StrTrAzCasing`
candidate #2: `unicode_titlecase::tr_az::TrAzCasing`
Check failure on line 28 in src/tr.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/tr.rs:28:35
|
28 | match is_reserved(s) {
| ----------- ^ expected `&str`, found `&mut Word`
| |
| arguments to this function are incorrect
|
= note: expected reference `&str`
found mutable reference `&mut content::Word`
note: function defined here
--> src/tr.rs:38:4
|
38 | fn is_reserved(word: &str) -> bool {
| ^^^^^^^^^^^ ----------
Check failure on line 26 in src/tr.rs
github-actions / clippy
no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_tr_or_az_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/tr.rs:26:19
|
26 | s.to_titlecase_tr_or_az_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_tr_or_az_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 38 in src/fr.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/fr.rs:38:29
|
38 | true => s.to_string().to_lowercase(),
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Word`, found `String`
|
help: try wrapping the expression in `content::Word` (its field is private, but it's local to this crate and its privacy can be changed)
|
38 | true => content::Word { word: s.to_string().to_lowercase() },
| +++++++++++++++++++++ +
Check failure on line 37 in src/fr.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/fr.rs:37:35
|
37 | match is_reserved(s) {
| ----------- ^ expected `&str`, found `&mut Word`
| |
| arguments to this function are incorrect
|
= note: expected reference `&str`
found mutable reference `&mut content::Word`
note: function defined here
--> src/fr.rs:47:4
|
47 | fn is_reserved(word: &str) -> bool {
| ^^^^^^^^^^^ ----------
Check failure on line 35 in src/fr.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/fr.rs:35:17
|
35 | s.to_string().to_titlecase_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ expected `Word`, found `String`
|
help: try wrapping the expression in `content::Word` (its field is private, but it's local to this crate and its privacy can be changed)
|
35 | content::Word { word: s.to_string().to_titlecase_lower_rest() }
| +++++++++++++++++++++ +
Check failure on line 30 in src/fr.rs
github-actions / clippy
no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/fr.rs:30:19
|
30 | s.to_titlecase_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 27 in src/fr.rs
github-actions / clippy
no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
--> src/fr.rs:27:20
|
27 | *s = s.to_lowercase();
| ^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `traits::Decasify` defines an item `to_lowercase`, perhaps you need to implement it
--> src/traits.rs:8:1
|
8 | pub trait Decasify {
| ^^^^^^^^^^^^^^^^^^
Check failure on line 106 in src/en.rs
github-actions / clippy
no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:106:19
|
106 | s.to_lowercase()
| ^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `traits::Decasify` defines an item `to_lowercase`, perhaps you need to implement it
--> src/traits.rs:8:1
|
8 | pub trait Decasify {
| ^^^^^^^^^^^^^^^^^^
Check failure on line 104 in src/en.rs
github-actions / clippy
no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:104:19
|
104 | s.to_titlecase_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 91 in src/en.rs
github-actions / clippy
no method named `to_uppercase` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_uppercase` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:91:20
|
91 | *s = s.to_uppercase()
| ^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `traits::Decasify` defines an item `to_uppercase`, perhaps you need to implement it
--> src/traits.rs:8:1
|
8 | pub trait Decasify {
| ^^^^^^^^^^^^^^^^^^
Check failure on line 81 in src/en.rs
github-actions / clippy
no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:81:20
|
81 | *s = s.to_lowercase()
| ^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `traits::Decasify` defines an item `to_lowercase`, perhaps you need to implement it
--> src/traits.rs:8:1
|
8 | pub trait Decasify {
| ^^^^^^^^^^^^^^^^^^
Check failure on line 43 in src/en.rs
github-actions / clippy
no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:43:32
|
43 | false => s.to_titlecase_lower_rest(),
| ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 42 in src/en.rs
github-actions / clippy
no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_lowercase` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:42:31
|
42 | true => s.to_lowercase(),
| ^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
note: `traits::Decasify` defines an item `to_lowercase`, perhaps you need to implement it
--> src/traits.rs:8:1
|
8 | pub trait Decasify {
| ^^^^^^^^^^^^^^^^^^
Check failure on line 41 in src/en.rs
github-actions / clippy
mismatched types
error[E0308]: mismatched types
--> src/en.rs:41:35
|
41 | match is_reserved(s) {
| ----------- ^ expected `&str`, found `&mut Word`
| |
| arguments to this function are incorrect
|
= note: expected reference `&str`
found mutable reference `&mut content::Word`
note: function defined here
--> src/en.rs:68:4
|
68 | fn is_reserved(word: &str) -> bool {
| ^^^^^^^^^^^ ----------
Check failure on line 39 in src/en.rs
github-actions / clippy
no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:39:19
|
39 | s.to_titlecase_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`
Check failure on line 34 in src/en.rs
github-actions / clippy
no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
error[E0599]: no method named `to_titlecase_lower_rest` found for mutable reference `&mut content::Word` in the current scope
--> src/en.rs:34:19
|
34 | s.to_titlecase_lower_rest()
| ^^^^^^^^^^^^^^^^^^^^^^^ method not found in `&mut Word`
|
= help: items from traits can only be used if the trait is implemented and in scope
= note: the following trait defines an item `to_titlecase_lower_rest`, perhaps you need to implement it:
candidate #1: `unicode_titlecase::StrTitleCase`