Checking 930ae4aa6752e9d441123bbd663fbb1d76a4fca3 #22
Annotations
1 error and 13 warnings
examples/print_html.rs#L4
error[E0308]: mismatched types
--> examples/print_html.rs:4:59
|
4 | let metadata = get_metadata("./config/metadata.json", "emojis", "OpenMoji");
| ------------ ^^^^^^^^ expected `WebiconFamily`, found `&str`
| |
| arguments to this function are incorrect
|
note: function defined here
--> /home/runner/work/webicons/webicons/src/lib.rs:82:8
|
82 | pub fn get_metadata(file_path: &str, family: WebiconFamily, vendor: &str) -> WebiconVendorMetadata {
| ^^^^^^^^^^^^
|
The following actions uses node12 which is deprecated and will be forced to run on node16: actions-rs/toolchain@v1, actions-rs/clippy@master. For more info: https://github.blog/changelog/2023-06-13-github-actions-all-actions-will-run-on-node16-instead-of-node12-by-default/
|
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
The `set-output` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
|
src/lib.rs#L7
warning: this import is redundant
--> src/lib.rs:7:1
|
7 | use serde_json;
| ^^^^^^^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `#[warn(clippy::single_component_path_imports)]` on by default
|
src/lib.rs#L7
warning: this import is redundant
--> src/lib.rs:7:1
|
7 | use serde_json;
| ^^^^^^^^^^^^^^^ help: remove it entirely
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#single_component_path_imports
= note: `#[warn(clippy::single_component_path_imports)]` on by default
|
src/lib.rs#L52
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lib.rs:52:82
|
52 | if family == WebiconFamily::Emojis && !unic_emoji_char::is_emoji(str_to_char(&id)) {
| ^^^ help: change this to: `id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
src/lib.rs#L52
warning: this expression creates a reference which is immediately dereferenced by the compiler
--> src/lib.rs:52:82
|
52 | if family == WebiconFamily::Emojis && !unic_emoji_char::is_emoji(str_to_char(&id)) {
| ^^^ help: change this to: `id`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
= note: `#[warn(clippy::needless_borrow)]` on by default
|
src/lib.rs#L172
warning: called `map(..).flatten()` on `Iterator`
--> src/lib.rs:172:48
|
172 | let shortcodes: Vec<&str> = emojis::iter().map(|x| x.shortcodes()).flatten().collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.shortcodes())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
src/lib.rs#L172
warning: called `map(..).flatten()` on `Iterator`
--> src/lib.rs:172:48
|
172 | let shortcodes: Vec<&str> = emojis::iter().map(|x| x.shortcodes()).flatten().collect();
| ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try replacing `map` with `flat_map` and remove the `.flatten()`: `flat_map(|x| x.shortcodes())`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#map_flatten
= note: `#[warn(clippy::map_flatten)]` on by default
|
src/lib.rs#L194
warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> src/lib.rs:194:5
|
194 | s.chars().nth(0).unwrap()
| ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.chars().next()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
= note: `#[warn(clippy::iter_nth_zero)]` on by default
|
src/lib.rs#L194
warning: called `.nth(0)` on a `std::iter::Iterator`, when `.next()` is equivalent
--> src/lib.rs:194:5
|
194 | s.chars().nth(0).unwrap()
| ^^^^^^^^^^^^^^^^ help: try calling `.next()` instead of `.nth(0)`: `s.chars().next()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#iter_nth_zero
= note: `#[warn(clippy::iter_nth_zero)]` on by default
|
The logs for this run have expired and are no longer available.
Loading