diff options
author | Alan Du <[email protected]> | 2019-06-04 07:28:22 +0100 |
---|---|---|
committer | Alan Du <[email protected]> | 2019-06-04 23:05:07 +0100 |
commit | 619a61529878f82daf7aed571bc4f6a10bd6dd9f (patch) | |
tree | 5a4fa21a4410d353dd0522813df94cc6aea77cdd /crates/ra_mbe | |
parent | 7bcd8d6290f63a725a62cc7da0269c08c1b6c99b (diff) |
Fix clippy::len_zero
Diffstat (limited to 'crates/ra_mbe')
-rw-r--r-- | crates/ra_mbe/src/syntax_bridge.rs | 2 |
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 | ||