Skip to content

Commit

Permalink
Changed slice::check_range to RangeBounds::assert_len.
Browse files Browse the repository at this point in the history
In 1.49 the slice::check_range unstable funciton got moved to
RangeBounds::assert_len.
rust-lang/rust#76885
  • Loading branch information
Simon Roosen committed Oct 31, 2020
1 parent 0a709e1 commit d110f5d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
#![no_std]
#![cfg_attr(feature = "unstable", feature(core_intrinsics))]
#![cfg_attr(feature = "unstable", feature(const_generics))]
#![cfg_attr(feature = "unstable", feature(slice_check_range))]
#![cfg_attr(feature = "unstable", feature(range_bounds_assert_len))]
#![cfg_attr(feature = "unstable", allow(incomplete_features))]
#![warn(missing_docs)]

Expand Down Expand Up @@ -625,7 +625,7 @@ where
let Range {
start: src_start,
end: src_end,
} = slice::check_range(self.reference.len(), src);
} = src.assert_len(self.reference.len());
let count = src_end - src_start;
assert!(
dest <= self.reference.len() - count,
Expand Down

0 comments on commit d110f5d

Please sign in to comment.