This commit is contained in:
John Smith
2021-11-27 12:44:21 -05:00
parent d1f728954c
commit 028e02f942
31 changed files with 190 additions and 207 deletions

View File

@@ -161,22 +161,11 @@ impl AttachmentManager {
pub fn is_attached(&self) -> bool {
let s = self.inner.lock().attachment_machine.state();
match s {
AttachmentState::Attaching => true,
AttachmentState::AttachedWeak => true,
AttachmentState::AttachedGood => true,
AttachmentState::AttachedStrong => true,
AttachmentState::FullyAttached => true,
AttachmentState::OverAttached => true,
_ => false,
}
!matches!(s, AttachmentState::Detached | AttachmentState::Detaching)
}
pub fn is_detached(&self) -> bool {
let s = self.inner.lock().attachment_machine.state();
match s {
AttachmentState::Detached => true,
_ => false,
}
matches!(s, AttachmentState::Detached)
}
pub fn get_attach_timestamp(&self) -> Option<u64> {