Skip to content

Commit 3d28eca

Browse files
committed
fix(voice): import ActivationMode in non-macOS dictation listener
start_rdev_listener (cfg not(target_os = "macos")) maps DictationActivationMode into the hotkey ActivationMode, but the type was never imported — so cargo clippy/build fails on Linux with "cannot find type ActivationMode". macOS was unaffected because the function is cfg'd out there. Add a cfg-gated use matching the only cfg that references the type (no unused-import warning on macOS).
1 parent 0881023 commit 3d28eca

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

src/openhuman/voice/dictation_listener.rs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,10 @@ use tokio::sync::broadcast;
1313
use tokio::task::JoinHandle;
1414

1515
use crate::openhuman::config::Config;
16+
// Only `start_rdev_listener` (non-macOS) maps into the hotkey `ActivationMode`,
17+
// so gate the import to the same cfg to avoid an unused-import warning on macOS.
18+
#[cfg(not(target_os = "macos"))]
19+
use crate::openhuman::voice::hotkey::ActivationMode;
1620

1721
const LOG_PREFIX: &str = "[dictation_listener]";
1822

0 commit comments

Comments
 (0)