Skip to content

Commit

Permalink
Format
Browse files Browse the repository at this point in the history
  • Loading branch information
PENGUINLIONG committed Dec 25, 2023
1 parent ce2f554 commit 20ba132
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 5 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,17 +33,17 @@ jobs:
run: |
cargo fmt -- --check
- name: Cargo build
- name: Cargo Build
id: cargo_build
run: |
cargo build --verbose
- name: Cargo test
- name: Cargo Test
id: cargo_test
run: |
cargo test --verbose
- name: Run SPIR-Q examples
- name: Run SPIR-Q Examples
id: spirq_examples
run: |
cargo run --example gallery > spirq/examples/gallery/main.log
Expand All @@ -61,7 +61,7 @@ jobs:
diff assets/spirv-spec.frag.json assets/spirv-spec.frag.spv.json
cargo run -p shader-reflect assets/moon.spv -o assets/moon.spv.json --reference-all-resources
- name: Assemble-disassemble Roundtrip
- name: Assemble Disassemble Roundtrip
id: cargo_build_and_test
run: |
cargo run -p spirq-as assets/gallery.frag.spvasm -o assets/gallery.frag.spv
Expand Down
4 changes: 3 additions & 1 deletion spirq-core/src/parse/instr.rs
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,9 @@ impl<'a> Operands<'a> {
pub fn read_str(&mut self) -> Result<&'a str> {
use std::ffi::CStr;
// Find the word with a trailing zero.
let ieos = self.0.iter()
let ieos = self
.0
.iter()
.position(|x| (x >> 24) == 0)
.ok_or(anyhow!("string is not null-terminated"))?;

Expand Down

0 comments on commit 20ba132

Please sign in to comment.