aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-03 15:27:51 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commitb28ca32db22d5e2ed34db556c6fd50a5fc2d679c (patch)
tree7e86e3f6ffdbc972b2ac968503f2b3671fd9b3a5 /crates/ra_syntax/src
parent40424d4222d4630bc53294d10f1718f2d3d300de (diff)
Fix clippy::or_fun_call
Diffstat (limited to 'crates/ra_syntax/src')
-rw-r--r--crates/ra_syntax/src/validation/unescape.rs2
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 2086046b6..91dbcfae8 100644
--- a/crates/ra_syntax/src/validation/unescape.rs
+++ b/crates/ra_syntax/src/validation/unescape.rs
@@ -255,7 +255,7 @@ where
255 let first_non_space = str 255 let first_non_space = str
256 .bytes() 256 .bytes()
257 .position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r') 257 .position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r')
258 .unwrap_or(str.len()); 258 .unwrap_or_else(|| str.len());
259 *chars = str[first_non_space..].chars() 259 *chars = str[first_non_space..].chars()
260 } 260 }
261} 261}