Skip to content

Rename --view to --pager #141

Rename --view to --pager

Rename --view to --pager #141

GitHub Actions / clippy failed Dec 7, 2023 in 0s

clippy

1 error

Details

Results

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

Versions

  • rustc 1.74.0 (79e9716c9 2023-11-13)
  • cargo 1.74.0 (ecb9851af 2023-10-18)
  • clippy 0.1.74 (79e9716 2023-11-13)

Annotations

Check failure on line 54 in src/http.rs

See this annotation in the file changed.

@github-actions github-actions / clippy

use of `format!` to build up a string from an iterator

error: use of `format!` to build up a string from an iterator
  --> src/http.rs:50:17
   |
50 |       let brief = brief.lines()
   |  _________________^
51 | |         .skip(2)
52 | |         .take(num_lines - 4)
53 | |         .map(|l| format!("{}\n", l))
54 | |         .collect::<String>()
   | |____________________________^
   |
help: call `fold` instead
  --> src/http.rs:53:10
   |
53 |         .map(|l| format!("{}\n", l))
   |          ^^^
help: ... and use the `write!` macro here
  --> src/http.rs:53:18
   |
53 |         .map(|l| format!("{}\n", l))
   |                  ^^^^^^^^^^^^^^^^^^
   = note: this can be written more efficiently by appending to a `String` directly
   = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#format_collect
   = note: `-D clippy::format-collect` implied by `-D warnings`
   = help: to override `-D warnings` add `#[allow(clippy::format_collect)]`