Skip to content

Commit d110f5d

Browse files
author
Simon Roosen
committed
Changed slice::check_range to RangeBounds::assert_len.
In 1.49 the slice::check_range unstable funciton got moved to RangeBounds::assert_len. rust-lang/rust#76885
1 parent 0a709e1 commit d110f5d

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/lib.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
#![no_std]
99
#![cfg_attr(feature = "unstable", feature(core_intrinsics))]
1010
#![cfg_attr(feature = "unstable", feature(const_generics))]
11-
#![cfg_attr(feature = "unstable", feature(slice_check_range))]
11+
#![cfg_attr(feature = "unstable", feature(range_bounds_assert_len))]
1212
#![cfg_attr(feature = "unstable", allow(incomplete_features))]
1313
#![warn(missing_docs)]
1414

@@ -625,7 +625,7 @@ where
625625
let Range {
626626
start: src_start,
627627
end: src_end,
628-
} = slice::check_range(self.reference.len(), src);
628+
} = src.assert_len(self.reference.len());
629629
let count = src_end - src_start;
630630
assert!(
631631
dest <= self.reference.len() - count,

0 commit comments

Comments
 (0)