File tree Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Expand file tree Collapse file tree 1 file changed +8
-6
lines changed Original file line number Diff line number Diff line change @@ -26,10 +26,12 @@ impl NCNotify {
26
26
number_of_unread : usize ,
27
27
) -> Result < ( ) , Box < dyn std:: error:: Error > > {
28
28
let mut notification = Notification :: new ( )
29
- . summary ( format ! ( "Unread: {room_name}" ) . as_str ( ) )
30
- . body ( format ! ( "You have {number_of_unread} new Messages in {room_name}" ) . as_str ( ) )
29
+ . summary ( & format ! ( "Unread: {room_name}" ) )
30
+ . body ( & format ! (
31
+ "You have {number_of_unread} new Messages in {room_name}"
32
+ ) )
31
33
. icon ( "dialog-information" )
32
- . appname ( self . app_name . as_str ( ) )
34
+ . appname ( & self . app_name )
33
35
. to_owned ( ) ;
34
36
if self . persistent {
35
37
log:: debug!( "Persistent Message!" ) ;
@@ -47,10 +49,10 @@ impl NCNotify {
47
49
48
50
pub fn new_room ( & self , room_name : & String ) -> Result < ( ) , Box < dyn std:: error:: Error > > {
49
51
let mut notification = Notification :: new ( )
50
- . summary ( format ! ( "New Room: {room_name}" ) . as_str ( ) )
51
- . body ( format ! ( "You have been added to a new Room {room_name}" ) . as_str ( ) )
52
+ . summary ( & format ! ( "New Room: {room_name}" ) )
53
+ . body ( & format ! ( "You have been added to a new Room {room_name}" ) )
52
54
. icon ( "dialog-information" )
53
- . appname ( self . app_name . as_str ( ) )
55
+ . appname ( & self . app_name )
54
56
. to_owned ( ) ;
55
57
if self . persistent {
56
58
notification
You can’t perform that action at this time.
0 commit comments