Remove unstable feature 'core'

This commit is contained in:
Eunchong Yu 2015-04-26 15:17:01 +09:00
parent 878b81d72f
commit b950d83454
2 changed files with 11 additions and 5 deletions

View File

@ -6,16 +6,22 @@
* Various scanning routines for the parser. * Various scanning routines for the parser.
*/ */
use std::iter;
use Weekday; use Weekday;
use super::{ParseResult, TOO_SHORT, INVALID, OUT_OF_RANGE}; use super::{ParseResult, TOO_SHORT, INVALID, OUT_OF_RANGE};
/// Returns true when two slices are equal case-insensitively (in ASCII). /// Returns true when two slices are equal case-insensitively (in ASCII).
/// Assumes that the `pattern` is already converted to lower case. /// Assumes that the `pattern` is already converted to lower case.
fn equals(s: &str, pattern: &str) -> bool { fn equals(s: &str, pattern: &str) -> bool {
iter::order::equals(s.as_bytes().iter().map(|&c| match c { b'A'...b'Z' => c + 32, _ => c }), let mut xs = s.as_bytes().iter().map(|&c| match c { b'A'...b'Z' => c + 32, _ => c });
pattern.as_bytes().iter().cloned()) let mut ys = pattern.as_bytes().iter().cloned();
loop {
match (xs.next(), ys.next()) {
(None, None) => return true,
(None, _) | (_, None) => return false,
(Some(x), Some(y)) if x != y => return false,
_ => (),
}
}
} }
/// Tries to parse the non-negative number from `min` to `max` digits. /// Tries to parse the non-negative number from `min` to `max` digits.

View File

@ -267,7 +267,7 @@ Advanced time zone handling is not yet supported (but is planned in 0.3).
#![doc(html_root_url = "https://lifthrasiir.github.io/rust-chrono/")] #![doc(html_root_url = "https://lifthrasiir.github.io/rust-chrono/")]
#![feature(core, std_misc, zero_one)] // lib stability features as per RFC #507 #![feature(std_misc, zero_one)] // lib stability features as per RFC #507
#![cfg_attr(test, feature(test))] // ditto #![cfg_attr(test, feature(test))] // ditto
#![deny(missing_docs)] #![deny(missing_docs)]