Function clippy::utils::method_chain_args
[−]
[src]
pub fn method_chain_args<'a>(expr: &'a Expr, methods: &[&str]) -> Option<Vec<&'a MethodArgs>>
Match an Expr
against a chain of methods, and return the matched Expr
s.
For example, if expr
represents the .baz()
in foo.bar().baz()
,
matched_method_chain(expr, &["bar", "baz"])
will return a Vec
containing the Expr
s for
.bar()
and .baz()