diff options
author | Ben Bridle <ben@derelict.engineering> | 2024-07-31 16:06:25 +1200 |
---|---|---|
committer | Ben Bridle <ben@derelict.engineering> | 2024-07-31 16:06:25 +1200 |
commit | 3d44c407c5c6c5574f6d3f272c6651fd75e07deb (patch) | |
tree | 2e48b2d7b66ca601954096a4108a8861cff69f45 /src/window.rs | |
parent | efe1d21b0e1ee79ef7547c0d8524a39be16ccc7d (diff) | |
download | phosphor-3d44c407c5c6c5574f6d3f272c6651fd75e07deb.zip |
Simplify code
We don't need to keep track of the previous value of the window title.
Diffstat (limited to 'src/window.rs')
-rw-r--r-- | src/window.rs | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/src/window.rs b/src/window.rs index 882d0b8..47e6fd4 100644 --- a/src/window.rs +++ b/src/window.rs @@ -16,7 +16,6 @@ pub struct Window { render_request: RenderRequest, previous_cursor_position: Option<Point>, previous_cursor_icon: CursorIcon, - previous_title: String, } impl Window { @@ -58,7 +57,6 @@ impl Window { render_request: RenderRequest::REDRAW, previous_cursor_position: None, previous_cursor_icon: CursorIcon::Default, - previous_title: String::new(), } } @@ -68,9 +66,8 @@ impl Window { pub fn update_title(&mut self) { let title = self.controller.title(); - if title != self.previous_title { + if title != self.window.title() { self.window.set_title(&title); - self.previous_title = title; } } |