mirror of
https://github.com/servo/servo.git
synced 2025-06-10 01:23:13 +00:00
Upgrade to rustc 1.3.0-dev (87055a68c 2015-07-30)
This commit is contained in:
parent
a3c0366bd6
commit
930921b0c3
7 changed files with 170 additions and 77 deletions
|
@ -22,7 +22,7 @@ pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]>
|
|||
// I could muck around with the maps and find the full path
|
||||
// however the more efficient way is to simply reverse the iterators and zip them
|
||||
// which will compare them in reverse until one of them runs out of segments
|
||||
if seg.iter().rev().zip(segments.iter().rev()).all(|(a,b)| a.identifier.as_str() == *b) {
|
||||
if seg.iter().rev().zip(segments.iter().rev()).all(|(a,b)| a.identifier.name.as_str() == *b) {
|
||||
match seg.last() {
|
||||
Some(&PathSegment {parameters: AngleBracketedParameters(ref a), ..}) => {
|
||||
Some(&a.types)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue