File: fix-tests.patch

package info (click to toggle)
rust-wast 239.0.0-1
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 1,552 kB
  • sloc: makefile: 2
file content (13 lines) | stat: -rw-r--r-- 578 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
diff --git a/src/core/binary/dwarf.rs b/src/core/binary/dwarf.rs
index 78be84e..b080f25 100644
--- a/src/core/binary/dwarf.rs
+++ b/src/core/binary/dwarf.rs
@@ -565,7 +565,7 @@ mod tests {
         // incremental update matches the precalculated position.
         let mut rand = SmallRng::seed_from_u64(102);
         for _ in 0..1000 {
-            let pos = rand.random_range(0..contents.len());
+            let pos = rand.gen_range(0..contents.len());
             dwarf.change_linecol(Span::from_offset(pos));
             let (line, col) = precalculated_linecols[pos];