mirror of
https://github.com/RustPython/RustPython.git
synced 2026-10-29 03:04:38 +08:00
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:
1 parent
419a0b228d
commit
ee0bb649bc
1 file changed
+1
-3
@@ -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};
|
||||
|
||||
Reference in new issue
Block a user