diff --git a/serialx/serialx_rust.py b/serialx/serialx_rust.py index 1b5ade0..a63c67e 100644 --- a/serialx/serialx_rust.py +++ b/serialx/serialx_rust.py @@ -15,11 +15,12 @@ try: from serialx._serialx_rust import list_serial_ports_impl except ImportError: - LOGGER.warning( - "serialx Rust extension failed to load; serial port enumeration will " - "not be available" - ) def list_serial_ports_impl() -> list[RustSerialPortInfo]: """Return an empty list when the Rust extension is unavailable.""" + LOGGER.warning( + "serialx Rust extension failed to load; serial port enumeration will " + "not be available" + ) + return []