diff options
author | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
---|---|---|
committer | bors[bot] <bors[bot]@users.noreply.github.com> | 2019-06-04 23:14:46 +0100 |
commit | 5deb907b4321d8328978d3322b0826b781814452 (patch) | |
tree | 2baa3b75b1ef62c02617c37ba9b800c41a3dd102 /crates/ra_text_edit/src | |
parent | 8bd0e844247dc28d6ceb24b00f3cc3396bd5bf03 (diff) | |
parent | aa30c4909ebb1e85f1591f465c9e2875aa4d394e (diff) |
Merge #1374
1374: Implement `cargo lint` and fix some clippy errors r=alanhdu a=alanhdu
This creates a `cargo lint` command that runs clippy with certain lints disabled. I've also gone ahead and fixed some of the lint errors, although there are many more still to go.
cc #848
Co-authored-by: Alan Du <[email protected]>
Diffstat (limited to 'crates/ra_text_edit/src')
-rw-r--r-- | crates/ra_text_edit/src/test_utils.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/crates/ra_text_edit/src/test_utils.rs b/crates/ra_text_edit/src/test_utils.rs index 9e21b24f6..2dc0e71af 100644 --- a/crates/ra_text_edit/src/test_utils.rs +++ b/crates/ra_text_edit/src/test_utils.rs | |||
@@ -42,8 +42,8 @@ pub fn arb_text_edit(text: &str) -> BoxedStrategy<TextEdit> { | |||
42 | .prop_flat_map(|cuts| { | 42 | .prop_flat_map(|cuts| { |
43 | let strategies: Vec<_> = cuts | 43 | let strategies: Vec<_> = cuts |
44 | .chunks(2) | 44 | .chunks(2) |
45 | .map(|chunk| match chunk { | 45 | .map(|chunk| match *chunk { |
46 | &[from, to] => { | 46 | [from, to] => { |
47 | let range = TextRange::from_to(from, to); | 47 | let range = TextRange::from_to(from, to); |
48 | Just(AtomTextEdit::delete(range)) | 48 | Just(AtomTextEdit::delete(range)) |
49 | .boxed() | 49 | .boxed() |
@@ -54,7 +54,7 @@ pub fn arb_text_edit(text: &str) -> BoxedStrategy<TextEdit> { | |||
54 | ) | 54 | ) |
55 | .boxed() | 55 | .boxed() |
56 | } | 56 | } |
57 | &[x] => arb_text().prop_map(move |text| AtomTextEdit::insert(x, text)).boxed(), | 57 | [x] => arb_text().prop_map(move |text| AtomTextEdit::insert(x, text)).boxed(), |
58 | _ => unreachable!(), | 58 | _ => unreachable!(), |
59 | }) | 59 | }) |
60 | .collect(); | 60 | .collect(); |