Skip to content

Merge pull request #27 from Lurk/serializer #72

Merge pull request #27 from Lurk/serializer

Merge pull request #27 from Lurk/serializer #72

GitHub Actions / clippy succeeded Oct 8, 2023 in 1s

clippy

4 warnings

Details

Results

Message level Amount
Internal compiler error 0
Error 0
Warning 4
Note 0
Help 0

Versions

  • rustc 1.74.0-beta.1 (b5c050feb 2023-10-03)
  • cargo 1.74.0-beta.1 (59596f0f3 2023-09-29)
  • clippy 0.1.74 (b5c050f 2023-10-03)

Annotations

Check warning on line 92 in src/nodes/list_item.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

call to `.clone()` on a reference in this situation does nothing

warning: call to `.clone()` on a reference in this situation does nothing
  --> src/nodes/list_item.rs:92:60
   |
92 |             format!("\n{}{} ", " ".repeat(level), list_type.clone()).as_str(),
   |                                                            ^^^^^^^^ help: remove this redundant call
   |
   = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed

Check warning on line 91 in src/nodes/list_item.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

call to `.clone()` on a reference in this situation does nothing

warning: call to `.clone()` on a reference in this situation does nothing
  --> src/nodes/list_item.rs:91:58
   |
91 |             format!("{}{} ", " ".repeat(level), list_type.clone()).as_str(),
   |                                                          ^^^^^^^^ help: remove this redundant call
   |
   = note: the type `str` does not implement `Clone`, so calling `clone` on `&str` copies the reference, which does not do anything and can be removed
   = note: `#[warn(noop_method_call)]` on by default

Check warning on line 149 in src/nodes/yamd.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value
   --> src/nodes/yamd.rs:149:32
    |
149 |             metadata: metadata.unwrap_or(Metadata::default()),
    |                                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default

Check warning on line 29 in src/nodes/metadata.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `unwrap_or` to construct default value

warning: use of `unwrap_or` to construct default value
  --> src/nodes/metadata.rs:29:24
   |
29 |             tags: tags.unwrap_or(vec![]),
   |                        ^^^^^^^^^^^^^^^^^ help: try: `unwrap_or_default()`
   |
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
   = note: `#[warn(clippy::unwrap_or_default)]` on by default