Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Please several clippy pedantic issues
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
- Loading branch information