aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesse Luehrs <doy@tozt.net>2019-11-01 15:00:55 -0400
committerJesse Luehrs <doy@tozt.net>2019-11-01 15:00:55 -0400
commitb12d00c942dc2b984b9ab84c76f64733fa05bc95 (patch)
tree99e406f730d4834edb58dcb462db9bec9ad13d81
parent34f476000424bb59650105f9b33e682b2eeb40ea (diff)
downloadvt100-rust-b12d00c942dc2b984b9ab84c76f64733fa05bc95.tar.gz
vt100-rust-b12d00c942dc2b984b9ab84c76f64733fa05bc95.zip
simplify
-rw-r--r--src/screen.rs4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/screen.rs b/src/screen.rs
index b72347c..ec4d114 100644
--- a/src/screen.rs
+++ b/src/screen.rs
@@ -494,13 +494,13 @@ impl State {
}
fn osc1(&mut self, s: &[u8]) {
- if let Some(s) = std::str::from_utf8(s).ok() {
+ if let Ok(s) = std::str::from_utf8(s) {
self.icon_name = Some(s.to_string())
}
}
fn osc2(&mut self, s: &[u8]) {
- if let Some(s) = std::str::from_utf8(s).ok() {
+ if let Ok(s) = std::str::from_utf8(s) {
self.title = Some(s.to_string())
}
}