We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 51de3cf commit 4b56eecCopy full SHA for 4b56eec
1 file changed
libcc2rs/src/rc.rs
@@ -297,10 +297,7 @@ impl<T> Ptr<T> {
297
298
#[inline]
299
pub fn offset(&self, offset: impl TryInto<isize>) -> Self {
300
- let offset = match offset.try_into() {
301
- Ok(o) => o,
302
- Err(_) => panic!("the offset must fit in a isize"),
303
- };
+ let offset = offset.try_into().expect("the offset must fit in a isize");
304
let step = self.elem_step();
305
Self {
306
kind: self.kind.clone(),
0 commit comments