Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-12024

[Rust] Lint failuers in arrow/src/array/array_binary.rs:427:20

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Workaround
    • None
    • None
    • Rust
    • None

    Description

      Master has some lint failures:
      https://github.com/apache/arrow/pull/9749/checks?check_run_id=2144048180

      error: this `else { if .. }` block can be collapsed
         --> arrow/src/array/array_binary.rs:427:20
          |
      427 |               } else {
          |  ____________________^
      428 | |                 if let Some(size) = size {
      429 | |                     buffer.extend_zeros(size);
      430 | |                 } else {
      431 | |                     prepend += 1;
      432 | |                 }
      433 | |             }
          | |_____________^
          |
          = note: `-D clippy::collapsible-if` implied by `-D warnings`
          = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#collapsible_if
      help: collapse nested if block
          |
      427 |             } else if let Some(size) = size {
      428 |                 buffer.extend_zeros(size);
      429 |             } else {
      430 |                 prepend += 1;
      431 |             }
          |
      

      Intrpduced in https://github.com/apache/arrow/commit/775a714006e2dbe0ed15cb83deb69c2c2ce1e77c (though I had problems reproducing this locally)

      Attachments

        Activity

          People

            alamb Andrew Lamb
            alamb Andrew Lamb
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: