Skip to content

Commit 4fd8fb5

Browse files
committed
Update to rust master
1 parent 68da65e commit 4fd8fb5

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
[package]
22

33
name = "regex"
4-
version = "0.1.3"
4+
version = "0.1.4"
55
authors = ["The Rust Project Developers"]
66
license = "MIT/Apache-2.0"
77
readme = "README.md"

src/parse.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -908,7 +908,7 @@ impl<'a> Parser<'a> {
908908
}
909909

910910
fn parse_uint(&self, s: &str) -> Result<uint, Error> {
911-
match from_str::<uint>(s) {
911+
match s.parse::<uint>() {
912912
Some(i) => Ok(i),
913913
None => {
914914
self.err(format!("Expected an unsigned integer but got '{}'.",

src/re.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -541,8 +541,8 @@ impl Regex {
541541
}
542542

543543
pub enum NamesIter<'a> {
544-
NamesIterNative(::std::slice::Items<'a, Option<&'static str>>),
545-
NamesIterDynamic(::std::slice::Items<'a, Option<String>>)
544+
NamesIterNative(::std::slice::Iter<'a, Option<&'static str>>),
545+
NamesIterDynamic(::std::slice::Iter<'a, Option<String>>)
546546
}
547547

548548
impl<'a> Iterator<Option<String>> for NamesIter<'a> {
@@ -770,7 +770,7 @@ impl<'t> Captures<'t> {
770770
let pre = refs.at(1).unwrap_or("");
771771
let name = refs.at(2).unwrap_or("");
772772
format!("{}{}", pre,
773-
match from_str::<uint>(name.as_slice()) {
773+
match name.parse::<uint>() {
774774
None => self.name(name).unwrap_or("").to_string(),
775775
Some(i) => self.at(i).unwrap_or("").to_string(),
776776
})

0 commit comments

Comments
 (0)