Skip to content

Commit

Permalink
remove unneeded clone
Browse files Browse the repository at this point in the history
  • Loading branch information
icewind1991 committed Aug 14, 2023
1 parent 76dfbb5 commit b90e4cf
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/connection.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ pub struct ActiveConnections(DashMap<UserId, broadcast::Sender<PushMessage>, Pas

impl ActiveConnections {
pub fn add(&self, user: UserId) -> Result<broadcast::Receiver<PushMessage>> {
match self.0.entry(user.clone()) {
match self.0.entry(user) {
Entry::Occupied(entry) => {
let sender = entry.get();
if sender.receiver_count() > USER_CONNECTION_LIMIT {
Expand Down

0 comments on commit b90e4cf

Please sign in to comment.