Skip to content

Commit ee0bb64

Browse files
authored
winsound: drop the imports the NUL-safe PlaySound left behind (#8554)
WideCString::from_vec rejects interior NULs itself, so the explicit check through exceptions::nul_char_error and the to_wide_with_nul call it fed both went away; TryFromBorrowedObject arrived unused. Windows clippy rejects all three, which is every Windows clippy run since. Assisted-by: Claude
1 parent 419a0b2 commit ee0bb64

1 file changed

Lines changed: 1 addition & 3 deletions

File tree

‎crates/vm/src/stdlib/winsound.rs‎

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,9 +6,7 @@ pub(crate) use winsound::module_def;
66
#[pymodule]
77
mod winsound {
88
use crate::builtins::{PyBaseExceptionRef, PyBytes, PyStr};
9-
use crate::convert::{IntoPyException, ToPyException, TryFromBorrowedObject};
10-
use crate::exceptions;
11-
use crate::host_env::windows::ToWideString;
9+
use crate::convert::{IntoPyException, ToPyException};
1210
use crate::protocol::{BufferFlags, PyBuffer};
1311
use crate::{AsObject, PyObjectRef, PyResult, VirtualMachine};
1412
use rustpython_host_env::winsound::{PlaySoundError, PlaySoundSource, play_sound};

0 commit comments

Comments
 (0)