Skip to content

develop #29: clippy writeln!() enhancements #30

@sitkevij

Description

@sitkevij

clippy enhancements found on develop branch #29

$ make clippy
warning: using `write!()` with a format string that ends in a single newline
   --> src/lib.rs:324:17
    |
324 |                 write!(locked, "{}\n", ascii_string)?; // print ascii string
    |                 ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    |
    = note: `#[warn(clippy::write_with_newline)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#write_with_newline
help: use `writeln!()` instead
    |
324 |                 writeln!(locked, "{}", ascii_string)?; // print ascii string
    |                 ^^^^^^^            --

warning: using `writeln!(locked, "")`
   --> src/lib.rs:397:9
    |
397 |         writeln!(locked, "")?;
    |         ^^^^^^^^^^^^^^^^^^^^ help: replace it with: `writeln!(locked)`
    |
    = note: `#[warn(clippy::writeln_empty_string)]` on by default
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#writeln_empty_string

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions