Skip to content

Commit 0eea7f2

Browse files
committed
address reviewer feedback: use unwrap_or_default
1 parent 0369e2f commit 0eea7f2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/ircd/proto.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -192,7 +192,7 @@ pub async fn list_channels(target: &str, matrirc: &Matrirc) -> Result<()> {
192192
_ => "#",
193193
};
194194
let users = joined.members_no_sync(RoomMemberships::ACTIVE).await?.len();
195-
let topic = joined.topic().unwrap_or_else(|| "".to_string());
195+
let topic = joined.topic().unwrap_or_default();
196196
irc.send(raw_msg(format!(
197197
":matrirc 322 {} {}{} {} :{}",
198198
target, prefix, channame, users, topic

0 commit comments

Comments
 (0)