Решение на Spell Checker от Людмил Данаилов
Обратно към всички решения
Към профила на Людмил Данаилов
Резултати
- 0 точки от тестове
- 0 бонус точки
- 0 точки общо
- 0 успешни тест(а)
- 0 неуспешни тест(а)
Код
Лог от изпълнението
Compiling solution v0.1.0 (/tmp/d20200114-2173579-1suh1c9/solution)
warning: unused variable: `word`
--> src/lib.rs:90:30
|
90 | pub fn correction(&self, word: &str) -> String {
| ^^^^ help: consider prefixing with an underscore: `_word`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `word`
--> src/lib.rs:133:26
|
133 | pub fn edits1(&self, word: &str) -> HashSet<String> {
| ^^^^ help: consider prefixing with an underscore: `_word`
warning: unused variable: `word`
--> src/lib.rs:140:26
|
140 | pub fn edits2(&self, word: &str) -> HashSet<String> {
| ^^^^ help: consider prefixing with an underscore: `_word`
warning: field is never used: `alphabet`
--> src/lib.rs:80:5
|
80 | alphabet: String,
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
warning: unused variable: `word`
--> src/lib.rs:90:30
|
90 | pub fn correction(&self, word: &str) -> String {
| ^^^^ help: consider prefixing with an underscore: `_word`
|
= note: `#[warn(unused_variables)]` on by default
warning: unused variable: `word`
--> src/lib.rs:133:26
|
133 | pub fn edits1(&self, word: &str) -> HashSet<String> {
| ^^^^ help: consider prefixing with an underscore: `_word`
warning: unused variable: `word`
--> src/lib.rs:140:26
|
140 | pub fn edits2(&self, word: &str) -> HashSet<String> {
| ^^^^ help: consider prefixing with an underscore: `_word`
warning: field is never used: `alphabet`
--> src/lib.rs:80:5
|
80 | alphabet: String,
| ^^^^^^^^^^^^^^^^
|
= note: `#[warn(dead_code)]` on by default
error[E0277]: can't compare `std::string::String` with `&std::string::String`
--> tests/solution_test.rs:169:5
|
169 | assert_eq!(known_words, vec![&String::from("four"), &String::from("one")]);
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ no implementation for `std::string::String == &std::string::String`
|
= help: the trait `std::cmp::PartialEq<&std::string::String>` is not implemented for `std::string::String`
= note: required because of the requirements on the impl of `std::cmp::PartialEq<std::vec::Vec<&std::string::String>>` for `std::vec::Vec<std::string::String>`
= note: this error originates in a macro outside of the current crate (in Nightly builds, run with -Z external-macro-backtrace for more info)
error: aborting due to previous error
For more information about this error, try `rustc --explain E0277`.
error: could not compile `solution`.
To learn more, run the command again with --verbose.
История (1 версия и 1 коментар)
Людмил качи първо решение на 14.01.2020 16:36 (преди над 5 години)