aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_syntax/src/validation
diff options
context:
space:
mode:
Diffstat (limited to 'crates/ra_syntax/src/validation')
-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}