Merge pull request #20 from wenderen/path-fields

Path has only 2 fields now
This commit is contained in:
Manish Goregaokar 2014-12-04 15:51:51 -08:00
commit a9e0f48fd5

View file

@ -17,7 +17,7 @@ declare_lint!(CLIPPY_DLIST, Warn,
/// Matches a type with a provided string, and returns its type parameters if successful /// Matches a type with a provided string, and returns its type parameters if successful
pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> { pub fn match_ty_unwrap<'a>(ty: &'a Ty, segments: &[&str]) -> Option<&'a [P<Ty>]> {
match ty.node { 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. // 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 // 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 // however the more efficient way is to simply reverse the iterators and zip them
@ -81,4 +81,4 @@ impl LintPass for TypePass {
} }
} }
} }
} }