File tree Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Expand file tree Collapse file tree 2 files changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -64,7 +64,7 @@ fn simulate(
64
64
let parent_picker = rand:: distributions:: Uniform :: new ( 0 , popsize) ;
65
65
let breakpoint_generator = rand:: distributions:: Uniform :: new ( 0.0 , 1.0 ) ;
66
66
let mut rng = rand:: rngs:: StdRng :: seed_from_u64 ( seed) ;
67
- let mut bookmark = tskit:: types:: Bookmark :: new ( ) ;
67
+ let mut bookmark = tskit:: types:: Bookmark :: default ( ) ;
68
68
69
69
for birth_time in ( 0 ..num_generations) . rev ( ) {
70
70
for c in children. iter_mut ( ) {
Original file line number Diff line number Diff line change @@ -68,6 +68,12 @@ impl Bookmark {
68
68
bookmark_setter ! ( set_provenances, provenances) ;
69
69
}
70
70
71
+ impl Default for Bookmark {
72
+ fn default ( ) -> Self {
73
+ Self :: new ( )
74
+ }
75
+ }
76
+
71
77
#[ cfg( test) ]
72
78
mod test {
73
79
@@ -82,7 +88,7 @@ mod test {
82
88
83
89
#[ test]
84
90
fn test_bookmark_mutability ( ) {
85
- let mut b = Bookmark :: new ( ) ;
91
+ let mut b = Bookmark :: default ( ) ;
86
92
assert_eq ! ( b. offsets. nodes, 0 ) ;
87
93
assert_eq ! ( b. offsets. edges, 0 ) ;
88
94
assert_eq ! ( b. offsets. individuals, 0 ) ;
You can’t perform that action at this time.
0 commit comments