Skip to content

Commit

Permalink
fetchpost: clippy missing semicolon; short-circuit debug msg in hot…
Browse files Browse the repository at this point in the history
… loop

warning: consider adding a `;` to the last statement for consistent formatting
   --> src/cmd/fetchpost.rs:621:13
    |
621 |             s.clone_into(&mut url)
    |             ^^^^^^^^^^^^^^^^^^^^^^ help: add a `;` here: `s.clone_into(&mut url);`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned
    = note: `-W clippy::semicolon-if-nothing-returned` implied by `-W clippy::pedantic`
  • Loading branch information
jqnatividad committed Jan 25, 2023
1 parent 2c43aaa commit aa603a2
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/cmd/fetchpost.rs
Original file line number Diff line number Diff line change
Expand Up @@ -613,12 +613,14 @@ pub fn run(argv: &[&str]) -> CliResult<()> {
serde_json::Value::String(value_string),
);
}
debug!("{form_body_jsonmap:?}");
if log::log_enabled!(Debug) {
debug!("{form_body_jsonmap:?}");
}

if literal_url_used {
url = literal_url.clone();
} else if let Ok(s) = std::str::from_utf8(&record[column_index]) {
s.clone_into(&mut url)
s.clone_into(&mut url);
} else {
url = String::new();
}
Expand Down

0 comments on commit aa603a2

Please sign in to comment.