Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/elixir-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
submodules: recursive

- name: Set up Elixir
uses: erlef/setup-beam@8aa8a857c6be0daae6e97272bb299d5b942675a4 # v1.19.0
uses: erlef/setup-beam@75edbb82877ab10edeb12a99c3cf2f0909f3dc87 # v1.20.1
with:
otp-version: ${{matrix.variation.otp}}
elixir-version: ${{matrix.variation.elixir}}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
submodules: recursive
- uses: dtolnay/rust-toolchain@fcf085fcb4b4b8f63f96906cd713eb52181b5ea4 # 1.0-fcf085f
- uses: taiki-e/install-action@a092537a3547af99875d9fdf67ec85c08738a2f9 # biome-a092537
- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
workspaces: "./bindings/rust"
- name: cargo hack
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:
with:
target: ${{ matrix.target }}

- uses: Swatinem/rust-cache@9d47c6ad4b02e050fd481d890b2ea34778fd09d6 # v2.7.8
- uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0
with:
workspaces: "./bindings/rust"
cache-on-failure: true
Expand Down
24 changes: 12 additions & 12 deletions bindings/rust/src/bindings/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ impl fmt::Display for Error {
| Self::InvalidKzgCommitment(s)
| Self::InvalidTrustedSetup(s)
| Self::MismatchLength(s) => f.write_str(s),
Self::LoadingTrustedSetupFailed(s) => write!(f, "KzgErrors: {:?}", s),
Self::LoadingTrustedSetupFailed(s) => write!(f, "KzgErrors: {s:?}"),
Self::CError(s) => fmt::Debug::fmt(s, f),
}
}
Expand Down Expand Up @@ -123,7 +123,7 @@ pub enum KzgErrors {
pub fn hex_to_bytes(hex_str: &str) -> Result<Vec<u8>, Error> {
let trimmed_str = hex_str.strip_prefix("0x").unwrap_or(hex_str);
hex::decode(trimmed_str)
.map_err(|e| Error::InvalidHexFormat(format!("Failed to decode hex: {}", e)))
.map_err(|e| Error::InvalidHexFormat(format!("Failed to decode hex: {e}")))
}

/// Holds the parameters of a kzg trusted setup ceremony.
Expand Down Expand Up @@ -1011,7 +1011,7 @@ mod tests {
.join("corpus")
.join("fuzz_blob_to_kzg_commitment");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
}
Expand Down Expand Up @@ -1060,7 +1060,7 @@ mod tests {
.join("corpus")
.join("fuzz_compute_kzg_proof");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
file.write_all(&z.bytes).unwrap();
Expand Down Expand Up @@ -1106,7 +1106,7 @@ mod tests {
.join("corpus")
.join("fuzz_compute_blob_kzg_proof");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
file.write_all(&commitment.bytes).unwrap();
Expand Down Expand Up @@ -1153,7 +1153,7 @@ mod tests {
.join("corpus")
.join("fuzz_verify_kzg_proof");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&commitment.bytes).unwrap();
file.write_all(&z.bytes).unwrap();
Expand Down Expand Up @@ -1201,7 +1201,7 @@ mod tests {
.join("corpus")
.join("fuzz_verify_blob_kzg_proof");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
file.write_all(&commitment.bytes).unwrap();
Expand Down Expand Up @@ -1248,7 +1248,7 @@ mod tests {
.join("corpus")
.join("fuzz_verify_blob_kzg_proof_batch");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
for blob in &blobs {
file.write_all(&blob.bytes).unwrap();
Expand Down Expand Up @@ -1297,7 +1297,7 @@ mod tests {
.join("corpus")
.join("fuzz_compute_cells");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
}
Expand Down Expand Up @@ -1339,7 +1339,7 @@ mod tests {
.join("corpus")
.join("fuzz_compute_cells_and_kzg_proofs");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
file.write_all(&blob.bytes).unwrap();
}
Expand Down Expand Up @@ -1389,7 +1389,7 @@ mod tests {
.join("corpus")
.join("fuzz_recover_cells_and_kzg_proofs");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
for cell_index in &cell_indices {
file.write_all(&cell_index.to_le_bytes()).unwrap();
Expand Down Expand Up @@ -1446,7 +1446,7 @@ mod tests {
.join("corpus")
.join("fuzz_verify_cell_kzg_proof_batch");
fs::create_dir_all(&dir_path).unwrap();
let file_path = dir_path.join(format!("data_{}.bin", index));
let file_path = dir_path.join(format!("data_{index}.bin"));
let mut file = File::create(&file_path).unwrap();
for commitment in &commitments {
file.write_all(&commitment.bytes).unwrap();
Expand Down
Loading