Skip to content

Commit

Permalink
fix: rust unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
appflowy committed Apr 28, 2022
1 parent 10d4021 commit b779097
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions frontend/rust-lib/flowy-text-block/tests/editor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -309,9 +309,9 @@ impl Rng {
let i = if left == 1 {
1
} else {
1 + self.0.gen_range(0, std::cmp::min(left - 1, 20))
1 + self.0.gen_range(0..std::cmp::min(left - 1, 20))
};
match self.0.gen_range(0.0, 1.0) {
match self.0.gen_range(0.0..1.0) {
f if f < 0.2 => {
delta.insert(&self.gen_string(i), RichTextAttributes::default());
}
Expand All @@ -323,7 +323,7 @@ impl Rng {
}
}
}
if self.0.gen_range(0.0, 1.0) < 0.3 {
if self.0.gen_range(0.0..1.0) < 0.3 {
delta.insert(&("1".to_owned() + &self.gen_string(10)), RichTextAttributes::default());
}
delta
Expand Down

0 comments on commit b779097

Please sign in to comment.