Commit 7fb0dcd 1 parent cc842c5 commit 7fb0dcd Copy full SHA for 7fb0dcd
File tree 1 file changed +8
-2
lines changed
1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -78,14 +78,14 @@ impl AssociationState {
78
78
}
79
79
80
80
pub fn entities ( & self ) -> Vec < Entity > {
81
- self . current_entities . values ( ) . map ( |e| e . clone ( ) ) . collect ( )
81
+ self . current_entities . values ( ) . cloned ( ) . collect ( )
82
82
}
83
83
84
84
pub fn entities_by_role ( & self , role : EntityRole ) -> Vec < Entity > {
85
85
self . current_entities
86
86
. values ( )
87
87
. filter ( |e| e. role == role)
88
- . map ( |e| e . clone ( ) )
88
+ . cloned ( )
89
89
. collect ( )
90
90
}
91
91
@@ -100,6 +100,12 @@ impl AssociationState {
100
100
}
101
101
}
102
102
103
+ impl Default for AssociationState {
104
+ fn default ( ) -> Self {
105
+ Self :: new ( )
106
+ }
107
+ }
108
+
103
109
#[ cfg( test) ]
104
110
mod tests {
105
111
use crate :: associations:: test_utils:: rand_string;
You can’t perform that action at this time.
0 commit comments