Skip to content

Commit be97a20

Browse files
committed
app: pass sender to watch only on linux
1 parent 51b905e commit be97a20

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

crates/companion-app/src/game.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,8 @@ pub fn save_file_for_profile(path: &Path, name: &OsStr) -> PathBuf {
104104

105105
pub fn file_watcher(
106106
install_dir: PathBuf,
107-
#[cfg_attr(target_os = "windows", expect(unused))]
107+
#[rustfmt::skip]
108+
#[cfg(target_os = "linux")]
108109
watch_actions_sender: std::sync::mpsc::Sender<WatchAction>,
109110
watch_actions_receiver: Arc<Mutex<std::sync::mpsc::Receiver<WatchAction>>>,
110111
) -> impl Stream<Item = FileUpdateEvent> {

crates/companion-app/src/main.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ fn subscription(state: &State) -> Subscription<Message> {
284284
TypeId::of::<FileUpdateEvent>(),
285285
file_watcher(
286286
dir.to_owned(),
287+
#[cfg(target_os = "linux")]
287288
state.send_file_watches.clone(),
288289
Arc::clone(&state.file_watches_receiver),
289290
),

0 commit comments

Comments
 (0)