diff options
author | wilmoz <wcubasalas@gmail.com> | 2015-08-31 12:30:55 -0500 |
---|---|---|
committer | wilmoz <wcubasalas@gmail.com> | 2015-08-31 12:30:55 -0500 |
commit | 64ac4f175fdce10d5869919c0e5a084b04e10b44 (patch) | |
tree | 9eacd408be1237a9cf11e5a47799f61fe5470a9f /components/plugins/utils.rs | |
parent | aee011a524c096d7535bb95a1e76a1586784aeb8 (diff) | |
download | servo-64ac4f175fdce10d5869919c0e5a084b04e10b44.tar.gz servo-64ac4f175fdce10d5869919c0e5a084b04e10b44.zip |
Make test-tidy check that braces have spaces before or after them
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r-- | components/plugins/utils.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/components/plugins/utils.rs b/components/plugins/utils.rs index 79025c33f70..e26cc4bc7cd 100644 --- a/components/plugins/utils.rs +++ b/components/plugins/utils.rs @@ -17,14 +17,14 @@ use syntax::ptr::P; /// Try not to use this for types defined in crates you own, use match_lang_ty instead (for lint passes) pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> { match ty.node { - TyPath(_, Path {segments: ref seg, ..}) => { + TyPath(_, Path { segments: ref seg, .. }) => { // So ast::Path isn't the full path, just the tokens that were provided. // 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.name.as_str() == *b) { match seg.last() { - Some(&PathSegment {parameters: AngleBracketedParameters(ref a), ..}) => { + Some(&PathSegment { parameters: AngleBracketedParameters(ref a), .. }) => { Some(&a.types) } _ => None |