From d42fd8efb6019c08371007df68ef3a38c2e86a45 Mon Sep 17 00:00:00 2001 From: Jess Balint Date: Fri, 22 May 2020 10:15:59 -0500 Subject: use char range --- crates/ra_assists/src/handlers/change_lifetime_anon_to_named.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'crates/ra_assists') diff --git a/crates/ra_assists/src/handlers/change_lifetime_anon_to_named.rs b/crates/ra_assists/src/handlers/change_lifetime_anon_to_named.rs index 7101d9aaf..67d50cfda 100644 --- a/crates/ra_assists/src/handlers/change_lifetime_anon_to_named.rs +++ b/crates/ra_assists/src/handlers/change_lifetime_anon_to_named.rs @@ -54,8 +54,8 @@ pub(crate) fn change_lifetime_anon_to_named(acc: &mut Assists, ctx: &AssistConte param_name }) .collect(); - "abcdefghijklmnopqrstuvwxyz" - .chars() + (b'a'..=b'z') + .map(char::from) .find(|c| !used_lifetime_params.contains(&c.to_string()))? } None => 'a', -- cgit v1.2.3