mirror of
https://github.com/hexedtech/codemp.git
synced 2025-03-15 03:25:31 +01:00
docs: better wording in detach_buffer docs
This commit is contained in:
parent
c1c9dea033
commit
888f7fd80c
1 changed files with 4 additions and 4 deletions
|
@ -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) {
|
||||
|
|
Loading…
Add table
Reference in a new issue