diff options
author | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-05 15:19:12 +0100 |
---|---|---|
committer | bors[bot] <26634292+bors[bot]@users.noreply.github.com> | 2019-07-05 15:19:12 +0100 |
commit | ec6f71576ace170fd306a68f77e5c5e9646d15be (patch) | |
tree | d39853a3366ea849b60b342240a5908f16899dcf /crates/ra_syntax/src/validation | |
parent | 3be2d1db6c04a99efdd32b1af724caeb10d9676b (diff) | |
parent | 98d769a799e430f152e573c28f101d9d6aee5376 (diff) |
Merge #1491
1491: More clippy r=matklad a=kjeremy
A few more clippy changes.
I'm a little unsure of the second commit. It's the trivially_copy_pass_by_ref lint and there are a number of places in the code we could use it if it makes sense.
Co-authored-by: Jeremy Kolb <[email protected]>
Diffstat (limited to 'crates/ra_syntax/src/validation')
-rw-r--r-- | crates/ra_syntax/src/validation/unescape.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_syntax/src/validation/unescape.rs b/crates/ra_syntax/src/validation/unescape.rs index 1cb2433f3..7eed6c663 100644 --- a/crates/ra_syntax/src/validation/unescape.rs +++ b/crates/ra_syntax/src/validation/unescape.rs | |||
@@ -262,7 +262,7 @@ where | |||
262 | 262 | ||
263 | fn byte_from_char(c: char) -> u8 { | 263 | fn byte_from_char(c: char) -> u8 { |
264 | let res = c as u32; | 264 | let res = c as u32; |
265 | assert!(res <= u8::max_value() as u32, "guaranteed because of Mode::Byte"); | 265 | assert!(res <= u32::from(u8::max_value()), "guaranteed because of Mode::Byte"); |
266 | res as u8 | 266 | res as u8 |
267 | } | 267 | } |
268 | 268 | ||