mail client (IMAP/SMTP)
git clone https://git.lucas.co/cce-mail.git
refactor: base() Option handling dropped (cce-ui flip part 1)
Element::base is guaranteed now — the map/map_or/if-let wrappers around a
base that always exists collapse to direct reads. Behavior-preserving.
Co-Authored-By: Claude Fable 5 <[email protected]>
Claude-Session: https://claude.ai/code/session_018u7qTwzX95dd5ysAkaSCLk
src/main.rs | 4 +---
1 file changed, 1 insertion(+), 3 deletions(-)
diff --git a/src/main.rs b/src/main.rs
index 4ece0a2..f756f84 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -1705,9 +1705,7 @@ impl Application for ClearEmailApp {
self.btn_reply.set_rect(detail_x, 8.0, 70.0, 26.0);
self.btn_delete.set_rect(detail_x + 80.0, 8.0, 80.0, 26.0);
self.btn_unread.set_rect(detail_x + 170.0, 8.0, 110.0, 26.0);
- if let Some(base) = self.btn_unread.base_mut() {
- base.label = Some((if read { "Mark Unread" } else { "Mark Read" }).to_string());
- }
+ self.btn_unread.base_mut().label = Some((if read { "Mark Unread" } else { "Mark Read" }).to_string());
let detail_w = (w_f32 - (detail_x + 15.0)).max(100.0);
self.detail_body.set_rect(detail_x, 170.0, detail_w, (h_f32 - 190.0).max(100.0));