Commit graph

3 commits

Author SHA1 Message Date
Fabian Zaiser
23404287fc Implement lint checking for unwraps that will always panic. 2018-06-12 15:04:44 +02:00
Fabian Zaiser
54826cf72e Address review comments. 2018-06-08 06:02:25 +02:00
Fabian Zaiser
81821acd59 Implement lint that checks for unidiomatic unwrap() (fixes #1770)
This checks for things like

    if x.is_some() {
        x.unwrap()
    }

which should be written using `if let` or `match` instead.

In the process I moved some logic to determine which variables are
mutated in an expression to utils/usage.rs.
2018-06-08 05:29:25 +02:00