Skip to content

Commit 29648c2

Browse files
author
Jorge Aparicio
committed
---
yaml --- r: 163241 b: refs/heads/snap-stage3 c: 60b0dd5 h: refs/heads/master i: 163239: b792e06 v: v3
1 parent a9987c4 commit 29648c2

File tree

2 files changed

+4
-6
lines changed

2 files changed

+4
-6
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
refs/heads/master: 9146a919b616e39e528e4d7100d16eef52f1f852
33
refs/heads/snap-stage1: e33de59e47c5076a89eadeb38f4934f58a3618a6
4-
refs/heads/snap-stage3: 56ecb51ba62b973e3a415cc0d6d6979dd7aeee7d
4+
refs/heads/snap-stage3: 60b0dd533b211ec434c7729f3952825a6386a329
55
refs/heads/try: 20cbbffeefc1f35e2ea63afce7b42fbd79611d42
66
refs/tags/release-0.1: 1f5c5126e96c79d22cb7862f75304136e204f105
77
refs/heads/dist-snap: ba4081a5a8573875fed17545846f6f6902c8ba8d

branches/snap-stage3/src/librustc_driver/pretty.rs

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -78,7 +78,7 @@ pub fn parse_pretty(sess: &Session, name: &str) -> (PpMode, Option<UserIdentifie
7878
or `expanded,identified`; got {}", name).as_slice());
7979
}
8080
};
81-
let opt_second = opt_second.and_then::<UserIdentifiedItem>(from_str);
81+
let opt_second = opt_second.and_then::<UserIdentifiedItem, _>(from_str);
8282
(first, opt_second)
8383
}
8484

@@ -313,14 +313,12 @@ pub enum UserIdentifiedItem {
313313

314314
impl FromStr for UserIdentifiedItem {
315315
fn from_str(s: &str) -> Option<UserIdentifiedItem> {
316-
let extract_path_parts = || {
316+
from_str(s).map(ItemViaNode).or_else(|| {
317317
let v : Vec<_> = s.split_str("::")
318318
.map(|x|x.to_string())
319319
.collect();
320320
Some(ItemViaPath(v))
321-
};
322-
323-
from_str(s).map(ItemViaNode).or_else(extract_path_parts)
321+
})
324322
}
325323
}
326324

0 commit comments

Comments
 (0)