Skip to content

Conversation

@cgzones
Copy link
Contributor

@cgzones cgzones commented Mar 20, 2023

warning: consider adding a `;` to the last statement for consistent formatting --> src/build.rs:6:5 | 6 | find_libarchive() | ^^^^^^^^^^^^^^^^^ help: add a `;` here: `find_libarchive();` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned warning: this argument is passed by value, but not consumed in the function body --> src/lib.rs:397:41 | 397 | fn run_with_archive<F, R, T>(ownership: Ownership, mut reader: R, f: F) -> Result<T> | ^^^^^^^^^ help: consider taking a reference instead: `&Ownership` | help: consider marking this type as `Copy` --> src/lib.rs:75:1 | 75 | pub enum Ownership { | ^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: item name ends with its containing module's name --> src/iterator.rs:47:1 | 47 | / pub struct ArchiveIterator<R: Read + Seek> { 48 | | archive_entry: *mut ffi::archive_entry, 49 | | archive_reader: *mut ffi::archive, 50 | | ... | 58 | | _utf8_guard: UTF8LocaleGuard, 59 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: unnecessary boolean `not` operation --> src/ffi/locale.rs:42:24 | 42 | let save = if !utf8_locale.is_null() { | ________________________^ 43 | | unsafe { libc::uselocale(utf8_locale) } 44 | | } else { 45 | | std::ptr::null_mut() 46 | | }; | |_____________^ | = 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: borrow as raw pointer --> src/lib.rs:459:21 | 459 | (&mut pipe as *mut SeekableReaderPipe) as *mut c_void, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::addr_of_mut!(pipe)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_as_ptr warning: borrow as raw pointer --> src/lib.rs:516:21 | 516 | (&mut pipe as *mut ReaderPipe) as *mut c_void, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::addr_of_mut!(pipe)` warning: explicit `deref_mut` method call --> src/iterator.rs:171:26 | 171 | (pipe.deref_mut() as *mut HeapReadSeekerPipe<R>) as *mut c_void, | ^^^^^^^^^^^^^^^^ help: try this: `&mut *pipe` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods 
 warning: consider adding a `;` to the last statement for consistent formatting --> src/build.rs:6:5 | 6 | find_libarchive() | ^^^^^^^^^^^^^^^^^ help: add a `;` here: `find_libarchive();` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#semicolon_if_nothing_returned warning: this argument is passed by value, but not consumed in the function body --> src/lib.rs:397:41 | 397 | fn run_with_archive<F, R, T>(ownership: Ownership, mut reader: R, f: F) -> Result<T> | ^^^^^^^^^ help: consider taking a reference instead: `&Ownership` | help: consider marking this type as `Copy` --> src/lib.rs:75:1 | 75 | pub enum Ownership { | ^^^^^^^^^^^^^^^^^^ = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#needless_pass_by_value warning: item name ends with its containing module's name --> src/iterator.rs:47:1 | 47 | / pub struct ArchiveIterator<R: Read + Seek> { 48 | | archive_entry: *mut ffi::archive_entry, 49 | | archive_reader: *mut ffi::archive, 50 | | ... | 58 | | _utf8_guard: UTF8LocaleGuard, 59 | | } | |_^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#module_name_repetitions warning: unnecessary boolean `not` operation --> src/ffi/locale.rs:42:24 | 42 | let save = if !utf8_locale.is_null() { | ________________________^ 43 | | unsafe { libc::uselocale(utf8_locale) } 44 | | } else { 45 | | std::ptr::null_mut() 46 | | }; | |_____________^ | = 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: borrow as raw pointer --> src/lib.rs:459:21 | 459 | (&mut pipe as *mut SeekableReaderPipe) as *mut c_void, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::addr_of_mut!(pipe)` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#borrow_as_ptr warning: borrow as raw pointer --> src/lib.rs:516:21 | 516 | (&mut pipe as *mut ReaderPipe) as *mut c_void, | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `std::ptr::addr_of_mut!(pipe)` warning: explicit `deref_mut` method call --> src/iterator.rs:171:26 | 171 | (pipe.deref_mut() as *mut HeapReadSeekerPipe<R>) as *mut c_void, | ^^^^^^^^^^^^^^^^ help: try this: `&mut *pipe` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#explicit_deref_methods
@coveralls
Copy link

coveralls commented Mar 20, 2023

Pull Request Test Coverage Report for Build 4472710887

Warning: This coverage report may be inaccurate.

This pull request's base commit is no longer the HEAD commit of its target branch. This means it includes changes from outside the original pull request, including, potentially, unrelated coverage changes.

Details

  • 2 of 3 (66.67%) changed or added relevant lines in 2 files are covered.
  • 1 unchanged line in 1 file lost coverage.
  • Overall coverage increased (+1.4%) to 85.5%

Changes Missing Coverage Covered Lines Changed/Added Lines %
src/lib.rs 0 1 0.0%
Files with Coverage Reduction New Missed Lines %
src/ffi/locale.rs 1 94.12%
Totals Coverage Status
Change from base Build 3870316599: 1.4%
Covered Lines: 342
Relevant Lines: 400

💛 - Coveralls
@otavio otavio merged commit 5ad0368 into OSSystems:master Mar 20, 2023
@cgzones cgzones deleted the clippy branch March 20, 2023 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

3 participants