aboutsummaryrefslogtreecommitdiffstats
path: root/components/plugins/utils.rs
diff options
context:
space:
mode:
Diffstat (limited to 'components/plugins/utils.rs')
-rw-r--r--components/plugins/utils.rs4
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