From d6c108cc6ca9ca13092e6cefe39df62f91149a0e Mon Sep 17 00:00:00 2001 From: Hendrik Sollich Date: Tue, 10 Oct 2023 11:11:16 +0200 Subject: [PATCH] refactor: remove redundant derefs --- src/notification.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/notification.rs b/src/notification.rs index 2e7364e..34dbef6 100644 --- a/src/notification.rs +++ b/src/notification.rs @@ -346,24 +346,24 @@ impl NotificationResponse { let activation_type = dictionary .object_for(NSString::from_str("activationType").deref()) - .map(|str| str.deref().as_str().to_owned()); + .map(|str| str.as_str().to_owned()); match activation_type.as_deref() { Some("actionClicked") => NotificationResponse::ActionButton( match dictionary.object_for(NSString::from_str("activationValue").deref()) { - Some(str) => str.deref().as_str().to_owned(), + Some(str) => str.as_str().to_owned(), None => String::from(""), }, ), Some("closeClicked") => NotificationResponse::CloseButton( match dictionary.object_for(NSString::from_str("activationValue").deref()) { - Some(str) => str.deref().as_str().to_owned(), + Some(str) => str.as_str().to_owned(), None => String::from(""), }, ), Some("replied") => NotificationResponse::Reply( match dictionary.object_for(NSString::from_str("activationValue").deref()) { - Some(str) => str.deref().as_str().to_owned(), + Some(str) => str.as_str().to_owned(), None => String::from(""), }, ),