make IdentIds expose an iterator of &str

This commit is contained in:
Folkert 2022-04-25 21:44:44 +02:00
parent e736adaa24
commit ae04887cb1
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
4 changed files with 16 additions and 14 deletions

View file

@ -104,8 +104,8 @@ impl<'a> Env<'a> {
region,
},
self.ident_ids
.idents()
.map(|(_, string)| string.as_ref().into())
.ident_strs()
.map(|(_, string)| string.into())
.collect(),
);
Err(error)
@ -127,9 +127,9 @@ impl<'a> Env<'a> {
}
None => {
let exposed_values = exposed_ids
.idents()
.ident_strs()
.filter(|(_, ident)| {
ident.as_ref().starts_with(|c: char| c.is_lowercase())
ident.starts_with(|c: char| c.is_lowercase())
})
.map(|(_, ident)| Lowercase::from(ident.as_ref()))
.collect();