aboutsummaryrefslogtreecommitdiff
path: root/crates/ra_mbe
diff options
context:
space:
mode:
authorAlan Du <[email protected]>2019-06-04 07:28:22 +0100
committerAlan Du <[email protected]>2019-06-04 23:05:07 +0100
commit619a61529878f82daf7aed571bc4f6a10bd6dd9f (patch)
tree5a4fa21a4410d353dd0522813df94cc6aea77cdd /crates/ra_mbe
parent7bcd8d6290f63a725a62cc7da0269c08c1b6c99b (diff)
Fix clippy::len_zero
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r--crates/ra_mbe/src/syntax_bridge.rs2
1 files changed, 1 insertions, 1 deletions
diff --git a/crates/ra_mbe/src/syntax_bridge.rs b/crates/ra_mbe/src/syntax_bridge.rs
index 0edb6f9a2..e3f93b23c 100644
--- a/crates/ra_mbe/src/syntax_bridge.rs
+++ b/crates/ra_mbe/src/syntax_bridge.rs
@@ -292,7 +292,7 @@ fn delim_to_str(d: tt::Delimiter, closing: bool) -> SmolStr {
292 }; 292 };
293 293
294 let idx = closing as usize; 294 let idx = closing as usize;
295 let text = if texts.len() > 0 { &texts[idx..texts.len() - (1 - idx)] } else { "" }; 295 let text = if !texts.is_empty() { &texts[idx..texts.len() - (1 - idx)] } else { "" };
296 text.into() 296 text.into()
297} 297}
298 298