Skip to content

Commit bdf9ee0

Browse files
committed
use new_unsafe in Step methods
This eliminates a panic branch.
1 parent 4d06b25 commit bdf9ee0

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/addr.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -256,7 +256,7 @@ impl VirtAddr {
256256
_ => {}
257257
}
258258

259-
Some(Self::new(addr))
259+
Some(unsafe { Self::new_unsafe(addr) })
260260
}
261261
}
262262

@@ -371,7 +371,7 @@ impl Step for VirtAddr {
371371
_ => {}
372372
}
373373

374-
Some(Self::new(addr))
374+
Some(unsafe { Self::new_unsafe(addr) })
375375
}
376376
}
377377

0 commit comments

Comments
 (0)