Skip to content

Commit

Permalink
Replace feature "range_bounds_assert_len" with "slice_range". Fixes r…
Browse files Browse the repository at this point in the history
  • Loading branch information
KernelFreeze committed Mar 4, 2021
1 parent 15740ae commit 7c1a349
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 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(range_bounds_assert_len))]
#![cfg_attr(feature = "unstable", feature(slice_range))]
#![cfg_attr(feature = "unstable", allow(incomplete_features))]
#![warn(missing_docs)]

Expand All @@ -25,6 +25,7 @@ use core::{
use core::{
intrinsics,
ops::{Range, RangeBounds},
slice::range,
};

/// Allows creating read-only and write-only `Volatile` values.
Expand Down Expand Up @@ -624,7 +625,7 @@ where
let Range {
start: src_start,
end: src_end,
} = src.assert_len(self.reference.len());
} = range(src, ..self.reference.len());
let count = src_end - src_start;
assert!(
dest <= self.reference.len() - count,
Expand Down

0 comments on commit 7c1a349

Please sign in to comment.