diff options
| author | Marvin Löbel <loebel.marvin@gmail.com> | 2013-12-06 19:51:10 +0100 |
|---|---|---|
| committer | Marvin Löbel <loebel.marvin@gmail.com> | 2014-01-08 00:53:40 +0100 |
| commit | 90b394514dad9df9c55b795be724093765d9df3a (patch) | |
| tree | 7e14d65e0e865662485c6f9f0dd2ca9fdcdb619f /src/libsyntax/parse | |
| parent | 4329fc6730e381b3b06f9987327072c50a739ad4 (diff) | |
| download | rust-90b394514dad9df9c55b795be724093765d9df3a.tar.gz rust-90b394514dad9df9c55b795be724093765d9df3a.zip | |
Renamed Option::map_default and mutate_default to map_or and mutate_or_set
Diffstat (limited to 'src/libsyntax/parse')
| -rw-r--r-- | src/libsyntax/parse/parser.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/libsyntax/parse/parser.rs b/src/libsyntax/parse/parser.rs index 40a2ef86e4f..60866e92efa 100644 --- a/src/libsyntax/parse/parser.rs +++ b/src/libsyntax/parse/parser.rs @@ -402,7 +402,7 @@ impl Parser { fn tokens_to_str(tokens: &[token::Token]) -> ~str { let mut i = tokens.iter(); // This might be a sign we need a connect method on Iterator. - let b = i.next().map_default(~"", |t| Parser::token_to_str(t)); + let b = i.next().map_or(~"", |t| Parser::token_to_str(t)); i.fold(b, |b,a| b + "`, `" + Parser::token_to_str(a)) } if edible.contains(&self.token) { @@ -467,7 +467,7 @@ impl Parser { pub fn commit_stmt(&mut self, s: @Stmt, edible: &[token::Token], inedible: &[token::Token]) { debug!("commit_stmt {:?}", s); let _s = s; // unused, but future checks might want to inspect `s`. - if self.last_token.as_ref().map_default(false, |t| is_ident_or_path(*t)) { + if self.last_token.as_ref().map_or(false, |t| is_ident_or_path(*t)) { let expected = vec::append(edible.to_owned(), inedible); self.check_for_erroneous_unit_struct_expecting(expected); } |
