Remove #![feature(collections_range)], as it is stable since Rust 1.28.
(Rust 1.28 is not yet released.) Also, rename methods to reflect changes made during stabilization.
This commit is contained in:
parent
69c1a40aa9
commit
c10a57bf91
@ -2,7 +2,7 @@ Managed
|
||||
=======
|
||||
|
||||
_managed_ is a library that provides a way to logically own objects, whether or not
|
||||
heap allocation is available.
|
||||
heap allocation is available. It works with rustc 1.26 or later.
|
||||
|
||||
Motivation
|
||||
----------
|
||||
@ -74,13 +74,13 @@ on the `std` crate.
|
||||
### Feature `alloc`
|
||||
|
||||
The `alloc` feature enables use of `Box`, `Vec`, and `BTreeMap` through a dependency
|
||||
on the `alloc` crate. This only works on nightly rustc.
|
||||
on the `alloc` crate. It requires the use of nightly rustc.
|
||||
|
||||
### Feature `map`
|
||||
|
||||
The `map` feature, disabled by default, enables the `ManagedMap` enum.
|
||||
Its interface is not stable yet and is subject to change.
|
||||
It also requires the use of a nightly compiler, 1.27 or later.
|
||||
It also requires the use of rustc 1.28 or later.
|
||||
|
||||
Usage
|
||||
-----
|
||||
|
@ -1,6 +1,5 @@
|
||||
#![no_std]
|
||||
#![cfg_attr(all(feature = "alloc", not(feature = "std")), feature(alloc))]
|
||||
#![cfg_attr(feature = "map", feature(collections_range))]
|
||||
|
||||
//! A library that provides a way to logically own objects, whether or not
|
||||
//! heap allocation is available.
|
||||
|
@ -164,12 +164,12 @@ fn binary_search_by_key_range<'a, K, V, Q: 'a, R>(slice: &[Option<(K, V)>], rang
|
||||
|
||||
// Find the beginning
|
||||
let begin;
|
||||
if let Bound::Unbounded = range.start() {
|
||||
if let Bound::Unbounded = range.start_bound() {
|
||||
begin = 0;
|
||||
} else {
|
||||
macro_rules! is_before_range {
|
||||
( $item: expr) => {
|
||||
match &range.start() {
|
||||
match &range.start_bound() {
|
||||
Bound::Included(ref key_begin) => $item < Some(key_begin.borrow()),
|
||||
Bound::Excluded(ref key_begin) => $item <= Some(key_begin.borrow()),
|
||||
Bound::Unbounded => unreachable!()
|
||||
@ -195,12 +195,12 @@ fn binary_search_by_key_range<'a, K, V, Q: 'a, R>(slice: &[Option<(K, V)>], rang
|
||||
|
||||
// Find the ending
|
||||
let end;
|
||||
if let Bound::Unbounded = range.end() {
|
||||
if let Bound::Unbounded = range.end_bound() {
|
||||
end = slice.len()
|
||||
} else {
|
||||
macro_rules! is_after_range {
|
||||
( $item:expr ) => {
|
||||
match &range.end() {
|
||||
match &range.end_bound() {
|
||||
Bound::Included(ref key_end) => $item > Some(key_end.borrow()),
|
||||
Bound::Excluded(ref key_end) => $item >= Some(key_end.borrow()),
|
||||
Bound::Unbounded => unreachable!()
|
||||
|
Loading…
Reference in New Issue
Block a user