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
This commit is contained in:
Jeong, YunWon authored and GitHub committed 2026-08-19 13:12:35 +09:00
1 parent 419a0b228d
commit ee0bb649bc
1 file changed
+1 -3
+1 -3
View File
@@ -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};