From b28ca32db22d5e2ed34db556c6fd50a5fc2d679c Mon Sep 17 00:00:00 2001 From: Alan Du Date: Mon, 3 Jun 2019 10:27:51 -0400 Subject: Fix clippy::or_fun_call --- crates/ra_syntax/src/validation/unescape.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'crates/ra_syntax/src') 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 let first_non_space = str .bytes() .position(|b| b != b' ' && b != b'\t' && b != b'\n' && b != b'\r') - .unwrap_or(str.len()); + .unwrap_or_else(|| str.len()); *chars = str[first_non_space..].chars() } } -- cgit v1.2.3