Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
Icxolu committed Nov 23, 2024
1 parent dbc793f commit 7636f0b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 3 deletions.
1 change: 0 additions & 1 deletion src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -447,7 +447,6 @@ impl<'py, T> IntoPyObjectExt<'py> for T where T: IntoPyObject<'py> {}
/// [`Cow<'a, str>`]: std::borrow::Cow
/// [`Cow::Borrowed`]: std::borrow::Cow::Borrowed
/// [`Cow::Owned`]: std::borrow::Cow::Owned
pub trait FromPyObject<'a, 'py>: Sized {
/// Extracts `Self` from the bound smart pointer `obj`.
///
Expand Down
3 changes: 2 additions & 1 deletion src/conversions/std/osstr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -226,7 +226,7 @@ impl<'py> IntoPyObject<'py> for &OsString {

#[cfg(test)]
mod tests {
use crate::types::{PyAnyMethods, PyString, PyStringMethods};
use crate::types::{PyString, PyStringMethods};
use crate::{BoundObject, IntoPyObject, Python};
use std::fmt::Debug;
use std::{
Expand All @@ -238,6 +238,7 @@ mod tests {
#[cfg(not(windows))]
fn test_non_utf8_conversion() {
Python::with_gil(|py| {
use crate::types::PyAnyMethods;
#[cfg(not(target_os = "wasi"))]
use std::os::unix::ffi::OsStrExt;
#[cfg(target_os = "wasi")]
Expand Down
3 changes: 2 additions & 1 deletion src/conversions/std/path.rs
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ impl<'py> IntoPyObject<'py> for &PathBuf {

#[cfg(test)]
mod tests {
use crate::types::{PyAnyMethods, PyString, PyStringMethods};
use crate::types::{PyString, PyStringMethods};
use crate::{BoundObject, IntoPyObject, Python};
use std::borrow::Cow;
use std::fmt::Debug;
Expand All @@ -154,6 +154,7 @@ mod tests {
#[cfg(not(windows))]
fn test_non_utf8_conversion() {
Python::with_gil(|py| {
use crate::types::PyAnyMethods;
use std::ffi::OsStr;
#[cfg(not(target_os = "wasi"))]
use std::os::unix::ffi::OsStrExt;
Expand Down

0 comments on commit 7636f0b

Please sign in to comment.