From 3368d3a5744d137128f31116c2896f450252a74d Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Wed, 19 Aug 2026 08:08:59 +0900 Subject: [PATCH] winsound: drop the imports the NUL-safe PlaySound left behind 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 --- crates/vm/src/stdlib/winsound.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/crates/vm/src/stdlib/winsound.rs b/crates/vm/src/stdlib/winsound.rs index 75f576adf81..fbefa236c6a 100644 --- a/crates/vm/src/stdlib/winsound.rs +++ b/crates/vm/src/stdlib/winsound.rs @@ -6,9 +6,7 @@ pub(crate) use winsound::module_def; #[pymodule] mod winsound { use crate::builtins::{PyBaseExceptionRef, PyBytes, PyStr}; - use crate::convert::{IntoPyException, ToPyException, TryFromBorrowedObject}; - use crate::exceptions; - use crate::host_env::windows::ToWideString; + use crate::convert::{IntoPyException, ToPyException}; use crate::protocol::{BufferFlags, PyBuffer}; use crate::{AsObject, PyObjectRef, PyResult, VirtualMachine}; use rustpython_host_env::winsound::{PlaySoundError, PlaySoundSource, play_sound};