Skip to content

Commit 7fb0dcd

Browse files
committed
Lint
1 parent cc842c5 commit 7fb0dcd

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

xmtp_id/src/associations/state.rs

+8-2
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,14 @@ impl AssociationState {
7878
}
7979

8080
pub fn entities(&self) -> Vec<Entity> {
81-
self.current_entities.values().map(|e| e.clone()).collect()
81+
self.current_entities.values().cloned().collect()
8282
}
8383

8484
pub fn entities_by_role(&self, role: EntityRole) -> Vec<Entity> {
8585
self.current_entities
8686
.values()
8787
.filter(|e| e.role == role)
88-
.map(|e| e.clone())
88+
.cloned()
8989
.collect()
9090
}
9191

@@ -100,6 +100,12 @@ impl AssociationState {
100100
}
101101
}
102102

103+
impl Default for AssociationState {
104+
fn default() -> Self {
105+
Self::new()
106+
}
107+
}
108+
103109
#[cfg(test)]
104110
mod tests {
105111
use crate::associations::test_utils::rand_string;

0 commit comments

Comments
 (0)