Skip to content

Commit

Permalink
Merge branch 'master' into no-more-float
Browse files Browse the repository at this point in the history
  • Loading branch information
wackbyte authored Oct 4, 2022
2 parents 4a66893 + b49ec8f commit c8fa449
Show file tree
Hide file tree
Showing 8 changed files with 9 additions and 9 deletions.
2 changes: 1 addition & 1 deletion autogen/src/binary.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ pub fn gen_operand_decode_errors(grammar: &[structs::OperandKind]) -> TokenStrea
use std::{error, fmt};

#[doc = "Decoder Error"]
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
#[allow(clippy::upper_case_acronyms)]
pub enum Error {
StreamExpected(usize),
Expand Down
2 changes: 1 addition & 1 deletion autogen/src/dr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -850,7 +850,7 @@ pub fn gen_dr_builder_normal_insts(grammar: &structs::Grammar) -> TokenStream {
}
});
quote! {
#[allow(clippy::identity_conversion, clippy::too_many_arguments)]
#[allow(clippy::useless_conversion, clippy::too_many_arguments)]
impl Builder {
#(#elements)*
}
Expand Down
4 changes: 2 additions & 2 deletions rspirv/binary/assemble.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ pub trait Assemble {

impl Assemble for dr::ModuleHeader {
fn assemble_into(&self, result: &mut Vec<u32>) {
result.extend(&[
result.extend([
self.magic_number,
self.version,
self.generator,
Expand Down Expand Up @@ -74,7 +74,7 @@ impl Assemble for dr::Operand {
| Self::IdRef(v)
| Self::LiteralBit32(v)
| Self::LiteralExtInstInteger(v) => result.push(v),
Self::LiteralBit64(v) => result.extend(&[v as u32, (v >> 32) as u32]),
Self::LiteralBit64(v) => result.extend([v as u32, (v >> 32) as u32]),
Self::LiteralSpecConstantOpInteger(v) => result.push(v as u32),
Self::LiteralString(ref v) => assemble_str(v, result),
Self::RayFlags(ref v) => result.push(v.bits()),
Expand Down
2 changes: 1 addition & 1 deletion rspirv/binary/autogen_error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

use std::{error, fmt};
#[doc = "Decoder Error"]
#[derive(Debug, PartialEq)]
#[derive(Debug, PartialEq, Eq)]
#[allow(clippy::upper_case_acronyms)]
pub enum Error {
StreamExpected(usize),
Expand Down
2 changes: 1 addition & 1 deletion rspirv/dr/build/autogen_norm_insts.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// external/spirv.core.grammar.json.
// DO NOT MODIFY!

#[allow(clippy::identity_conversion, clippy::too_many_arguments)]
#[allow(clippy::useless_conversion, clippy::too_many_arguments)]
impl Builder {
#[doc = "Appends an OpNop instruction to the current block."]
pub fn nop(&mut self) -> BuildResult<()> {
Expand Down
2 changes: 1 addition & 1 deletion rspirv/dr/build/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -884,7 +884,7 @@ mod tests {
+ module.debug_names.len()
+ module.debug_module_processed.len()
+ module.annotations.len())
+ (if module.memory_model.is_some() { 1 } else { 0 })
+ (usize::from(module.memory_model.is_some()))
== 1
}

Expand Down
2 changes: 1 addition & 1 deletion rspirv/dr/constructs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ pub struct Module {
}

/// Data representation of a SPIR-V module header.
#[derive(Clone, Debug, PartialEq)]
#[derive(Clone, Debug, PartialEq, Eq)]
pub struct ModuleHeader {
pub magic_number: Word,
pub version: Word,
Expand Down
2 changes: 1 addition & 1 deletion rspirv/dr/loader.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl Error {
/// This method is intended to be used by fmt::Display and error::Error to
/// avoid duplication in implementation. So it's private.
fn describe(&self) -> Cow<'static, str> {
match &*self {
match self {
Error::NestedFunction => Cow::Borrowed("found nested function"),
Error::UnclosedFunction => Cow::Borrowed("found unclosed function"),
Error::MismatchedFunctionEnd => Cow::Borrowed("found mismatched OpFunctionEnd"),
Expand Down

0 comments on commit c8fa449

Please sign in to comment.