Skip to content

Commit

Permalink
Fix clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
calebzulawski committed Nov 23, 2024
1 parent db10ec5 commit ad0f8a7
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion multiversion-macros/src/target.rs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ impl Target {
.ok_or_else(|| Error::new(s.span(), "expected architecture specifier"))?;

// Architecture can be either "architecture" or "architecture/cpu"
let mut maybe_cpu = architecture.splitn(2, |c| c == '/');
let mut maybe_cpu = architecture.splitn(2, '/');
let architecture = maybe_cpu
.next()
.ok_or_else(|| Error::new(s.span(), "expected architecture specifier"))?
Expand Down
2 changes: 1 addition & 1 deletion multiversion/benches/benchmark.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ pub fn benchmark_dispatcher(c: &mut Criterion) {
}

for len in &[0, 16, 1000] {
let mut g = c.benchmark_group(&format!("{len} elements"));
let mut g = c.benchmark_group(format!("{len} elements"));
let mut i = vec![0f32; *len];

#[cfg(feature = "std")]
Expand Down
8 changes: 4 additions & 4 deletions multiversion/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,10 @@
//! The following are some valid target specification strings:
//! * `"x86"` (matches the `"x86"` architecture)
//! * `"x86_64+avx+avx2"` (matches the `"x86_64"` architecture with the `"avx"` and `"avx2"`
//! features)
//! features)
//! * `"x86_64/x86-64-v2"` (matches the `"x86_64"` architecture with the `"x86-64-v2"` CPU)
//! * `"x86/i686+avx"` (matches the `"x86"` architecture with the `"i686"` CPU and `"avx"`
//! feature)
//! feature)
//! * `"arm+neon"` (matches the `arm` architecture with the `"neon"` feature
//!
//! A complete list of available target features and CPUs is available in the [`target-features`
Expand Down Expand Up @@ -117,9 +117,9 @@
///
/// This implementation has a few benefits:
/// * The function selector is typically only invoked once. Subsequent calls are reduced to an
/// atomic load.
/// atomic load.
/// * If called in multiple threads, there is no contention. Both threads may perform feature
/// detection, but the atomic ensures these are synchronized correctly.
/// detection, but the atomic ensures these are synchronized correctly.
///
/// ### Dispatcher elision
/// If the optimal set of features is already known to exist at compile time, the entire dispatcher
Expand Down

0 comments on commit ad0f8a7

Please sign in to comment.