Skip to content

Commit

Permalink
clippy::missing_const_for_fn
Browse files Browse the repository at this point in the history
warning: this could be a `const fn`
   --> src/cmd/diff.rs:190:5
    |
190 | /     fn new(csv_writer: csv::Writer<W>, no_headers: bool) -> Self {
191 | |         Self {
192 | |             csv_writer,
193 | |             no_headers,
194 | |         }
195 | |     }
    | |_____^
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#missing_const_for_fn
    = note: `-W clippy::missing-const-for-fn` implied by `-W clippy::nursery`
    = help: to override `-W clippy::nursery` add `#[allow(clippy::missing_const_for_fn)]`
  • Loading branch information
jqnatividad committed Jun 14, 2024
1 parent fc0ed2e commit db38a1c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/cmd/diff.rs
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ struct CsvDiffWriter<W: Write> {
}

impl<W: Write> CsvDiffWriter<W> {
fn new(csv_writer: csv::Writer<W>, no_headers: bool) -> Self {
const fn new(csv_writer: csv::Writer<W>, no_headers: bool) -> Self {
Self {
csv_writer,
no_headers,
Expand Down

0 comments on commit db38a1c

Please sign in to comment.