Skip to content

Commit

Permalink
Fix trivial clippy::needless_borrowed_reference (#241)
Browse files Browse the repository at this point in the history
  • Loading branch information
MarijnS95 authored Apr 6, 2023
1 parent c7305b8 commit 3a19780
Show file tree
Hide file tree
Showing 3 changed files with 1,624 additions and 1,636 deletions.
4 changes: 2 additions & 2 deletions autogen/src/sr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl OperandTokens {
let key = Ident::new(name, Span::call_site());
quote! {
match #iter.next() {
Some(&dr::Operand::#key(ref value)) => Some(#lift_value),
Some(dr::Operand::#key(value)) => Some(#lift_value),
Some(_) => return Err(OperandError::WrongType.into()),
None => None,
}
Expand All @@ -199,7 +199,7 @@ impl OperandTokens {
let second_key = Ident::new("IdRef", Span::call_site());
quote! {
match #iter.next() {
Some(&dr::Operand::#first_key(ref value)) => {
Some(dr::Operand::#first_key(value)) => {
let operands = #iter.map(|op| {
match *op {
dr::Operand::#second_key(second) => Ok(second),
Expand Down
2 changes: 1 addition & 1 deletion rspirv/binary/parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -777,7 +777,7 @@ mod tests {
impl error::Error for ErrorString {}
impl fmt::Display for ErrorString {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let &ErrorString(ref s) = self;
let ErrorString(s) = self;
write!(f, "{}", s)
}
}
Expand Down
Loading

0 comments on commit 3a19780

Please sign in to comment.