From 888f7fd80cfd919867e24e529e2a0350f2ba27e8 Mon Sep 17 00:00:00 2001 From: zaaarf Date: Sun, 3 Nov 2024 20:11:36 +0100 Subject: [PATCH] docs: better wording in detach_buffer docs --- src/workspace.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/workspace.rs b/src/workspace.rs index f8054fc..787166a 100644 --- a/src/workspace.rs +++ b/src/workspace.rs @@ -185,10 +185,10 @@ impl Workspace { /// /// This will stop and drop its [`buffer::Controller`]. /// - /// Returns `true` if connectly dropped or wasn't present, `false` if dropped but wasn't last ref - /// - /// If this method returns `false` you have a dangling ref, maybe just waiting for garbage - /// collection or maybe preventing the controller from being dropped completely + /// Returns `true` if it was connectly dropped or wasn't present, `false` if it was dropped but + /// wasn't the last existing reference to it. If this method returns `false` it means you have + /// a dangling reference somewhere. It may just be waiting for garbage collection, but as long + /// as it exists, it will prevent the controller from being completely dropped. #[allow(clippy::redundant_pattern_matching)] // all cases are clearer this way pub fn detach_buffer(&self, path: &str) -> bool { match self.0.buffers.remove(path) {