Skip to content

Commit

Permalink
Fix new clippy lints
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 committed Oct 11, 2023
1 parent 1ef89a4 commit 8702b22
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions generator/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ pub trait ConstantExt {
fn variant_ident(&self, enum_name: &str) -> Ident;
fn notation(&self) -> Option<&str>;
fn formatted_notation(&self) -> Option<Cow<'_, str>> {
static DOC_LINK: Lazy<Regex> = Lazy::new(|| Regex::new(r#"<<([\w-]+)>>"#).unwrap());
static DOC_LINK: Lazy<Regex> = Lazy::new(|| Regex::new(r"<<([\w-]+)>>").unwrap());
self.notation().map(|n| {
DOC_LINK.replace(
n,
Expand Down Expand Up @@ -2968,13 +2968,13 @@ pub fn write_source_code<P: AsRef<Path>>(vk_headers_dir: &Path, src_dir: P) {
let mut has_lifetimes = definitions
.iter()
.filter_map(get_variant!(vkxml::DefinitionsElement::Struct))
.filter_map(|s| {
.filter(|&s| {
s.elements
.iter()
.filter_map(get_variant!(vkxml::StructElement::Member))
.any(|x| x.reference.is_some())
.then(|| name_to_tokens(&s.name))
})
.map(|s| name_to_tokens(&s.name))
.collect::<HashSet<Ident>>();
for def in &definitions {
match def {
Expand Down

0 comments on commit 8702b22

Please sign in to comment.