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

Dependency bump and clippy #347

Merged
merged 14 commits into from
Aug 21, 2023
Merged

Commits on Aug 15, 2023

  1. bump dependencies

    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    8585c02 View commit details
    Browse the repository at this point in the history
  2. clippy::needless_borrow

    warning: this expression creates a reference which is immediately dereferenced by the compiler
        --> src/xls.rs:1003:42
         |
    1003 |                     .map_or("#REF", |sh| &sh);
         |                                          ^^^ help: change this to: `sh`
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_borrow
         = note: `#[warn(clippy::needless_borrow)]` on by default
    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    5d8e233 View commit details
    Browse the repository at this point in the history
  3. clippy::needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:610:53
        |
    610 | fn parse_short_string(r: &mut Record<'_>, encoding: &mut XlsEncoding) -> Result<String, XlsError> {
        |                                                     ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:627:37
        |
    627 | fn parse_string(r: &[u8], encoding: &mut XlsEncoding) -> Result<String, XlsError> {
        |                                     ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:725:16
        |
    725 | fn parse_xf(r: &mut Record<'_>) -> Result<u16, XlsError> {
        |                ^^^^^^^^^^^^^^^ help: consider changing to: `&Record<'_>`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:742:15
        |
    742 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:816:15
        |
    816 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:839:15
        |
    839 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:841:10
        |
    841 |     len: &mut usize,
        |          ^^^^^^^^^^ help: consider changing to: `&usize`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    8884bd3 View commit details
    Browse the repository at this point in the history
  4. more clippy::needless_pass_by_ref_mut

    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:463:15
        |
    463 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:768:15
        |
    768 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:985:15
        |
    985 |     encoding: &mut XlsEncoding,
        |               ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    840d5ac View commit details
    Browse the repository at this point in the history
  5. clippy::match_ref_pats

    warning: you don't need to add `&` to all patterns
        --> src/xls.rs:1304:5
         |
    1304 | /     match r {
    1305 | |         &[0x00, .., 0xFF, 0xFF] => Ok(None), // String, value should be in next record
    1306 | |         &[0x01, _, b, .., 0xFF, 0xFF] => Ok(Some(DataType::Bool(b != 0))),
    1307 | |         &[0x02, _, e, .., 0xFF, 0xFF] => parse_err(e).map(Some),
    ...    |
    1312 | |         _ => Ok(Some(DataType::Float(read_f64(r)))),
    1313 | |     }
         | |_____^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#match_ref_pats
         = note: `#[warn(clippy::match_ref_pats)]` on by default
    help: instead of prefixing all patterns with `&`, you can dereference the expression
         |
    1304 ~     match *r {
    1305 ~         [0x00, .., 0xFF, 0xFF] => Ok(None), // String, value should be in next record
    1306 ~         [0x01, _, b, .., 0xFF, 0xFF] => Ok(Some(DataType::Bool(b != 0))),
    1307 ~         [0x02, _, e, .., 0xFF, 0xFF] => parse_err(e).map(Some),
    1308 ~         [e, .., 0xFF, 0xFF] => Err(XlsError::Unrecognized {
    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    58cff0b View commit details
    Browse the repository at this point in the history
  6. clippy::unnecessary_mut_passed

    warning: the function `parse_format` doesn't need a mutable reference
       --> src/xls.rs:292:66
        |
    292 |                         let (idx, format) = parse_format(&mut r, &mut encoding)?;
        |                                                                  ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
        = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
    
    warning: the function `parse_xf` doesn't need a mutable reference
       --> src/xls.rs:297:43
        |
    297 |                         xfs.push(parse_xf(&mut r)?);
        |                                           ^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `parse_sheet_name` doesn't need a mutable reference
       --> src/xls.rs:301:68
        |
    301 |                         let (pos, name) = parse_sheet_name(&mut r, &mut encoding)?;
        |                                                                    ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `read_unicode_string_no_cch` doesn't need a mutable reference
       --> src/xls.rs:311:29
        |
    311 | ...                   &mut encoding,
        |                       ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `read_unicode_string_no_cch` doesn't need a mutable reference
       --> src/xls.rs:313:29
        |
    313 | ...                   &mut cch,
        |                       ^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `parse_sst` doesn't need a mutable reference
       --> src/xls.rs:329:59
        |
    329 |                     0x00FC => strings = parse_sst(&mut r, &mut encoding)?, // SST
        |                                                           ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
        = note: `#[warn(clippy::unnecessary_mut_passed)]` on by default
    
    warning: the function `parse_string` doesn't need a mutable reference
       --> src/xls.rs:396:73
        |
    396 |                         let val = DataType::String(parse_string(r.data, &mut encoding)?);
        |                                                                         ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `parse_formula` doesn't need a mutable reference
       --> src/xls.rs:425:29
        |
    425 | ...                   &mut encoding,
        |                       ^^^^^^^^^^^^^
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: the function `read_unicode_string_no_cch` doesn't need a mutable reference
        --> src/xls.rs:1104:66
         |
    1104 |                 read_unicode_string_no_cch(encoding, &rgce[1..], &mut cch, &mut formula);
         |                                                                  ^^^^^^^^
         |
         = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unnecessary_mut_passed
    
    warning: this argument is a mutable reference, but not used mutably
       --> src/xls.rs:704:44
        |
    704 | fn parse_sst(r: &mut Record<'_>, encoding: &mut XlsEncoding) -> Result<Vec<String>, XlsError> {
        |                                            ^^^^^^^^^^^^^^^^ help: consider changing to: `&XlsEncoding`
        |
        = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_ref_mut
        = note: `#[warn(clippy::needless_pass_by_ref_mut)]` on by default
    jqnatividad committed Aug 15, 2023
    Configuration menu
    Copy the full SHA
    0756f09 View commit details
    Browse the repository at this point in the history

Commits on Aug 16, 2023

  1. rust fmt

    jqnatividad committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    ab0fe9e View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    efe7701 View commit details
    Browse the repository at this point in the history
  3. use parse_sheet_metadata

    jqnatividad committed Aug 16, 2023
    Configuration menu
    Copy the full SHA
    a5dc1d4 View commit details
    Browse the repository at this point in the history

Commits on Aug 17, 2023

  1. rust fmt

    jqnatividad committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    5acf0d4 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    a4254b2 View commit details
    Browse the repository at this point in the history
  3. derive Default for DataType now that MSRV is 1.62.1

    warning: this `impl` can be derived
      --> src/datatype.rs:42:1
       |
    42 | / impl Default for DataType {
    43 | |     fn default() -> DataType {
    44 | |         DataType::Empty
    45 | |     }
    46 | | }
       | |_^
       |
       = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#derivable_impls
       = note: `#[warn(clippy::derivable_impls)]` on by default
       = help: remove the manual implementation...
    help: ...and instead derive it...
       |
    19 + #[derive(Default)]
    20 | pub enum DataType {
       |
    help: ...and mark the default variant
       |
    39 ~     #[default]
    40 ~     Empty,
    jqnatividad committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    1c759e6 View commit details
    Browse the repository at this point in the history
  4. change MSRV to 1.62.1

    jqnatividad committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    9baa594 View commit details
    Browse the repository at this point in the history
  5. bump MSRV to 163.0 as is-terminal requires it

    is-terminal is a dependency of env-logger
    jqnatividad committed Aug 17, 2023
    Configuration menu
    Copy the full SHA
    26713dd View commit details
    Browse the repository at this point in the history