Skip to content

Commit b946a43

Browse files
committed
Implemented BrainBacon's experimental changes as per commit 'b3802b7' but refactored to follow the structure of the newly refactored proc macro crate.
1 parent 6c4690b commit b946a43

File tree

1 file changed

+14
-0
lines changed
  • bevy_gpu_compute_macro/src/pipeline/phases/gpu_resource_mngmnt_and_wgsl_generator/to_wgsl_syntax

1 file changed

+14
-0
lines changed
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
pub struct UseStmtRemover {}
2+
3+
use quote::quote;
4+
use syn::{Item, visit_mut::VisitMut};
5+
6+
impl VisitMut for UseStmtRemover {
7+
fn visit_item_mut(&mut self, i: &mut Item) {
8+
syn::visit_mut::visit_item_mut(self, i);
9+
if let Item::Use(use_stmt) = i {
10+
// remove the use statement
11+
*i = Item::Verbatim(quote! {})
12+
}
13+
}
14+
}

0 commit comments

Comments
 (0)