Skip to content

Commit

Permalink
perf: wgsl::…::Lowerer::lower: don't clone diagnostic_filters are…
Browse files Browse the repository at this point in the history
…na (gfx-rs#7176)

Co-authored-by: Erich Gubler <[email protected]>
  • Loading branch information
junjunjd and ErichDonGubler authored Feb 25, 2025
1 parent b7d1f4c commit 93f64dc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions naga/src/front/wgsl/lower/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1049,10 +1049,10 @@ impl<'source, 'temp> Lowerer<'source, 'temp> {

pub fn lower(
&mut self,
tu: &'temp ast::TranslationUnit<'source>,
tu: ast::TranslationUnit<'source>,
) -> Result<crate::Module, Error<'source>> {
let mut module = crate::Module {
diagnostic_filters: tu.diagnostic_filters.clone(),
diagnostic_filters: tu.diagnostic_filters,
diagnostic_filter_leaf: tu.diagnostic_filter_leaf,
..Default::default()
};
Expand Down
2 changes: 1 addition & 1 deletion naga/src/front/wgsl/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ impl Frontend {
fn inner<'a>(&mut self, source: &'a str) -> Result<crate::Module, Error<'a>> {
let tu = self.parser.parse(source)?;
let index = index::Index::generate(&tu)?;
let module = Lowerer::new(&index).lower(&tu)?;
let module = Lowerer::new(&index).lower(tu)?;

Ok(module)
}
Expand Down

0 comments on commit 93f64dc

Please sign in to comment.