Skip to content

Commit b8656cc

Browse files
committed
chore: Fix some pedantic Clippy warnings
1 parent b4cd74a commit b8656cc

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/lib.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,7 @@
9797
9898
#![deny(missing_docs)]
9999
#![allow(clippy::needless_doctest_main)]
100+
#![allow(clippy::uninlined_format_args)]
100101

101102
use std::env;
102103
use std::fs::{create_dir_all, write};
@@ -200,6 +201,7 @@ impl ImportLibraryGenerator {
200201
///
201202
/// The compile target environment ABI name (as in `CARGO_CFG_TARGET_ENV`)
202203
/// is passed in `env`.
204+
#[must_use]
203205
pub fn new(arch: &str, env: &str) -> Self {
204206
ImportLibraryGenerator {
205207
arch: arch.to_string(),
@@ -293,8 +295,7 @@ impl ImportLibraryGenerator {
293295
_ => return Err(Error::new(ErrorKind::Other, "Unsupported Python version")),
294296
},
295297
PythonImplementation::PyPy => match self.version {
296-
Some((3, 7)) => ("libpypy3-c.def", include_str!("libpypy3-c.def")),
297-
Some((3, 8)) => ("libpypy3-c.def", include_str!("libpypy3-c.def")),
298+
Some((3, 7)) | Some((3, 8)) => ("libpypy3-c.def", include_str!("libpypy3-c.def")),
298299
Some((3, 9)) => ("libpypy3.9-c.def", include_str!("libpypy3.9-c.def")),
299300
Some((3, 10)) => ("libpypy3.10-c.def", include_str!("libpypy3.10-c.def")),
300301
_ => return Err(Error::new(ErrorKind::Other, "Unsupported PyPy version")),
@@ -500,7 +501,7 @@ fn get_mingw_dlltool(arch: &str) -> Result<Command> {
500501
}
501502
}
502503

503-
/// Finds the `zig` executable (when built by ``maturin --zig`).
504+
/// Finds the `zig` executable (when built by `maturin --zig`).
504505
///
505506
/// Examines the `ZIG_COMMAND` environment variable
506507
/// to find out if `zig cc` is being used as the linker.

0 commit comments

Comments
 (0)