From 36d7049749ff2cf5aead2bac7a2fdfb1b9ba82f3 Mon Sep 17 00:00:00 2001 From: Peter Ammon Date: Fri, 27 Dec 2024 14:46:46 -0800 Subject: [PATCH] Minor cleanup of other unsafe impl --- src/function.rs | 3 --- src/topic_monitor.rs | 1 + 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/function.rs b/src/function.rs index 59e21b7d4..584022bab 100644 --- a/src/function.rs +++ b/src/function.rs @@ -108,9 +108,6 @@ fn allow_autoload(&self, name: &wstr) -> bool { }) }); -// Safety: global lock. -unsafe impl Send for FunctionSet {} - /// Make sure that if the specified function is a dynamically loaded function, it has been fully /// loaded. Note this executes fish script code. pub fn load(name: &wstr, parser: &Parser) -> bool { diff --git a/src/topic_monitor.rs b/src/topic_monitor.rs index 8c921d604..1b9d286c0 100644 --- a/src/topic_monitor.rs +++ b/src/topic_monitor.rs @@ -336,6 +336,7 @@ pub struct TopicMonitor { } // safety: this is only needed for tests +#[cfg(test)] unsafe impl Sync for TopicMonitor {} /// The principal topic monitor.