Skip to content

Commit 2b600ac

Browse files
pfuto21454markharding
authored andcommitted
Notifications clippy fix
1 parent 75ba02a commit 2b600ac

1 file changed

Lines changed: 8 additions & 8 deletions

File tree

services/notifications/src/manager.rs

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -155,8 +155,8 @@ impl NotificationManager {
155155
async fn process_reply_notifications(
156156
&self,
157157
ctx: &Context,
158-
collapse_id: &String,
159-
author: &String,
158+
collapse_id: &str,
159+
author: &str,
160160
content: &Content,
161161
) -> Result<(), NotificationError> {
162162
// The reply target, when this is a post replying to someone other
@@ -175,14 +175,14 @@ impl NotificationManager {
175175
// Title is the author's display name, fetched over gRPC.
176176
let title = ctx
177177
.polycentric
178-
.display_name(&author)
178+
.display_name(author)
179179
.await
180180
.unwrap_or_else(|| "Anonymous".to_string());
181181

182182
self.send_to_identity(
183183
ctx,
184184
&recipient,
185-
collapse_id.clone(),
185+
collapse_id.to_owned(),
186186
title,
187187
"Replied to your post".to_string(),
188188
)
@@ -196,8 +196,8 @@ impl NotificationManager {
196196
async fn process_follower_notifications(
197197
&self,
198198
ctx: &Context,
199-
collapse_id: &String,
200-
author: &String,
199+
collapse_id: &str,
200+
author: &str,
201201
content: &Content,
202202
) -> Result<(), NotificationError> {
203203
// The followee target, when this is a follow of someone other than the
@@ -213,14 +213,14 @@ impl NotificationManager {
213213
// Title is the author's display name, fetched over gRPC.
214214
let title = ctx
215215
.polycentric
216-
.display_name(&author)
216+
.display_name(author)
217217
.await
218218
.unwrap_or_else(|| "Anonymous".to_string());
219219

220220
self.send_to_identity(
221221
ctx,
222222
&followee,
223-
collapse_id.clone(),
223+
collapse_id.to_owned(),
224224
title,
225225
"Followed you".to_string(),
226226
)

0 commit comments

Comments
 (0)