From 3a6ae01b120f504f5cbb4bd97507cbf225fb4a9b Mon Sep 17 00:00:00 2001 From: LGUG2Z Date: Fri, 1 Nov 2024 11:53:20 -0700 Subject: [PATCH] fix(borders): permit failure on global destruction This commit allows calls to Border::destroy to fail when called in the context of border_manager::destroy_all_borders. This is important in the context of the retile command, which calls this function, to not leave the retile in an inconsistent state. --- komorebi/src/border_manager/mod.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/komorebi/src/border_manager/mod.rs b/komorebi/src/border_manager/mod.rs index 71f760573..48271b5f2 100644 --- a/komorebi/src/border_manager/mod.rs +++ b/komorebi/src/border_manager/mod.rs @@ -89,7 +89,7 @@ pub fn destroy_all_borders() -> color_eyre::Result<()> { ); for (_, border) in borders.iter() { - border.destroy()?; + let _ = border.destroy(); } borders.clear(); @@ -107,7 +107,7 @@ pub fn destroy_all_borders() -> color_eyre::Result<()> { tracing::info!("purging unknown borders: {:?}", remaining_hwnds); for hwnd in remaining_hwnds { - Border::from(hwnd).destroy()?; + let _ = Border::from(hwnd).destroy(); } }