Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Typos n clippy #361

Merged
merged 5 commits into from
Oct 2, 2023
Merged

Typos n clippy #361

merged 5 commits into from
Oct 2, 2023

Conversation

jqnatividad
Copy link
Contributor

No description provided.

warning: redundant closure
   --> src/xlsx.rs:383:37
    |
383 |                         .filter_map(|a| a.ok())
    |                                     ^^^^^^^^^^ help: replace the closure with the method itself: `std::result::Result::ok`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#redundant_closure_for_method_calls
warning: this argument is passed by value, but not consumed in the function body
   --> src/xlsb.rs:380:51
    |
380 |     fn worksheet_range_from_path(&mut self, path: String) -> Result<Range<DataType>, XlsbError> {
    |                                                   ^^^^^^ help: consider changing the type to: `&str`
    |
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value
    = note: `-W clippy::needless-pass-by-value` implied by `-W clippy::pedantic`
    = help: to override `-W clippy::pedantic` add `#[allow(clippy::needless_pass_by_value)]`
warning: unnecessary `!=` operation
--> src/xls.rs:1323:5
|
1323 | / if stack.len() != 1 {
1324 | | Err(XlsError::InvalidFormula {
1325 | | stack_size: stack.len(),
1326 | | })
1327 | | } else {
1328 | | Ok(formula)
1329 | | }
| |_____^
|
= help: change to `==` and swap the blocks of the `if`/`else`
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
= note: `-W clippy::if-not-else` implied by `-W clippy::pedantic`
= help: to override `-W clippy::pedantic` add `#[allow(clippy::if_not_else)]`

warning: unnecessary `!=` operation
    --> src/xlsb.rs:1082:5
     |
1082 | /     if stack.len() != 1 {
1083 | |         Err(XlsbError::StackLen)
1084 | |     } else {
1085 | |         Ok(formula)
1086 | |     }
     | |_____^
     |
     = help: change to `==` and swap the blocks of the `if`/`else`
     = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else

warning: unnecessary boolean `not` operation
   --> src/de.rs:395:9
    |
395 | /         if !self.has_headers() {
396 | |             visitor.visit_seq(self)
397 | |         } else {
398 | |             visitor.visit_map(self)
399 | |         }
    | |_________^
    |
    = help: remove the `!` and swap the blocks of the `if`/`else`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else

warning: unnecessary boolean `not` operation
   --> src/de.rs:408:9
    |
408 | /         if !self.has_headers() {
409 | |             visitor.visit_seq(self)
410 | |         } else {
411 | |             visitor.visit_map(self)
412 | |         }
    | |_________^
    |
    = help: remove the `!` and swap the blocks of the `if`/`else`
    = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#if_not_else
@tafia tafia merged commit 60a5614 into tafia:master Oct 2, 2023
4 checks passed
@tafia
Copy link
Owner

tafia commented Oct 2, 2023

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants