Add to docs for if_let_some_result

This commit is contained in:
Gibson Fahnestock 2016-10-31 22:55:22 +00:00
parent 053896b678
commit c40466e1c2

View File

@ -9,12 +9,21 @@ use utils::{paths, method_chain_args, span_help_and_lint, match_type, snippet};
/// **Known problems:** None.
///
/// **Example:**
/// ```rustc
/// ```rust
/// for result in iter {
/// if let Some(bench) = try!(result).parse().ok() {
/// vec.push(bench)
/// }
/// }
///```
/// Could be written:
///
/// ```rust
/// for result in iter {
/// if let Ok(bench) = try!(result).parse() {
/// vec.push(bench)
/// }
/// }
/// ```
declare_lint! {
pub IF_LET_SOME_RESULT,