Skip to content

Commit

Permalink
Fix rustfmt and clippy complaints
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewBrownK committed Jan 1, 2025
1 parent 068ebc5 commit 0237523
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/compose/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl Composer {
auto: &'a mut u32,
}

impl<'a> regex::Replacer for AutoBindingReplacer<'a> {
impl regex::Replacer for AutoBindingReplacer<'_> {
fn replace_append(&mut self, _: &regex::Captures<'_>, dst: &mut String) {
dst.push_str(&format!("@binding({})", self.auto));
*self.auto += 1;
Expand Down
2 changes: 1 addition & 1 deletion src/compose/tokenizer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ pub enum Token<'a> {
Whitespace(&'a str, usize),
}

impl<'a> Token<'a> {
impl Token<'_> {
pub fn pos(&self) -> usize {
match self {
Token::Identifier(_, pos) | Token::Other(_, pos) | Token::Whitespace(_, pos) => *pos,
Expand Down
2 changes: 1 addition & 1 deletion src/derive.rs
Original file line number Diff line number Diff line change
Expand Up @@ -829,7 +829,7 @@ impl<'a> DerivedModule<'a> {
}
}

impl<'a> From<DerivedModule<'a>> for naga::Module {
impl From<DerivedModule<'_>> for naga::Module {
fn from(derived: DerivedModule) -> Self {
naga::Module {
types: derived.types,
Expand Down
2 changes: 1 addition & 1 deletion src/prune/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1576,7 +1576,7 @@ impl<'a> Pruner<'a> {

if required_load.is_some() || required_store.is_some() {
// just pass it all through i guess ..?
if let (Some(required_load), Some(result)) = (required_load, result){
if let (Some(required_load), Some(result)) = (required_load, result) {
self.add_expression(function, func_req, context, *result, &required_load);
}
if let Some(required_store) = required_store {
Expand Down

0 comments on commit 0237523

Please sign in to comment.