Skip to content

Commit

Permalink
Make clippy happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
yotarok committed May 27, 2024
1 parent 8e43704 commit 4873aa9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
1 change: 1 addition & 0 deletions src/arrayutils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -653,6 +653,7 @@ pub fn unaligned_map_and_update<T, const N: usize, U, F, G>(
/// 2. `Simd` is bit-equivalent with array, i.e.
/// `size_of::<Simd<T, N>>() == size_of::<T>() * N`.
/// <https://github.com/rust-lang/portable-simd/blob/master/beginners-guide.md#size-alignment-and-unsafe-code>
///
/// Still, there's a possibility that some architecture uses a different
/// element (or bit) order inside since the above conditions only for there
/// will be no memory violations. For the orders, we only rely on unittests.
Expand Down
3 changes: 1 addition & 2 deletions src/doctest_helper.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,14 +16,13 @@

// mimic clippy. This file acts as a part of the crate when checked by clippy.
// but it is outside of the crate when it is actually used by doctests.
#[cfg(feature = "clippy")]
#[cfg(clippy)]
use crate as flacenc;

use flacenc::component::Frame;
use flacenc::component::FrameHeader;
use flacenc::component::Stream;
use flacenc::config;
use flacenc::error::Verified;
use flacenc::error::Verify;
use flacenc::source::MemSource;

Expand Down
2 changes: 1 addition & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -138,7 +138,7 @@ pub mod source;
pub mod test_helper;

// this is for including "doctest_helper.rs" in lintting and auto-formating.
#[cfg(feature = "clippy")]
#[cfg(clippy)]
mod doctest_helper;

#[cfg(feature = "mimalloc")]
Expand Down

0 comments on commit 4873aa9

Please sign in to comment.