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
3 changes: 2 additions & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,5 +48,6 @@ jobs:

- name: Check README
run: |
cargo install cargo-rdme
cargo install cargo-rdme --version 2.2.3 --locked
cargo rdme install-rust-toolchain-for-intralinks
cargo rdme --check
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,9 +35,9 @@ of returning the calculated hash in different representations:
* [`PoseidonBytesHasher`](https://docs.rs/light-poseidon/latest/light_poseidon/trait.PoseidonBytesHasher.html) with the
`hash_bytes_be` and `hash_bytes_le` methods which returns a byte array.
* [`PoseidonHasher`](https://docs.rs/light-poseidon/latest/light_poseidon/trait.PoseidonHasher.html) with the `hash` method which returns
[`ark_ff::PrimeField`](ark_ff::PrimeField). Might be useful if you want
[`ark_ff::PrimeField`](https://docs.rs/ark_ff/latest/ark_ff/fields/prime/trait.PrimeField.html). Might be useful if you want
to immediately process the result with an another library which works with
[`ark_ff::PrimeField`](ark_ff::PrimeField) types.
[`ark_ff::PrimeField`](https://docs.rs/ark_ff/latest/ark_ff/fields/prime/trait.PrimeField.html) types.

## Examples

Expand All @@ -64,7 +64,7 @@ println!("{:?}", hash);
```

With [`PoseidonHasher`](https://docs.rs/light-poseidon/latest/light_poseidon/trait.PoseidonHasher.html) trait and
[`ark_ff::PrimeField`](ark_ff::PrimeField) result:
[`ark_ff::PrimeField`](https://docs.rs/ark_ff/latest/ark_ff/fields/prime/trait.PrimeField.html) result:

```rust
use light_poseidon::{Poseidon, PoseidonHasher, parameters::bn254_x5};
Expand Down
6 changes: 3 additions & 3 deletions xtask/src/generate_parameters.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,15 +65,15 @@ pub fn generate_parameters(_opts: Options) -> Result<(), anyhow::Error> {
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()
.map_err(|e| anyhow::format_err!("git clone failed: {}", e.to_string()))?;
.map_err(|e| anyhow::format_err!("git clone failed: {}", e))?;
}
if !Path::new("./target/params").exists() {
let _mkdir_result = std::process::Command::new("mkdir")
.arg("./target/params")
.stdout(Stdio::inherit())
.stderr(Stdio::inherit())
.output()
.map_err(|e| anyhow::format_err!("mkdir failed: {}", e.to_string()))?;
.map_err(|e| anyhow::format_err!("mkdir failed: {}", e))?;
}
for i in 2..14 {
let path = format!("./target/params/poseidon_params_bn254_x5_{}", i);
Expand Down Expand Up @@ -240,7 +240,7 @@ pub fn generate_parameters(_opts: Options) -> Result<(), anyhow::Error> {
std::process::Command::new("cargo")
.arg("fmt")
.output()
.map_err(|e| anyhow::format_err!("cargo fmt failed: {}", e.to_string()))?;
.map_err(|e| anyhow::format_err!("cargo fmt failed: {}", e))?;
Ok(())
}

Expand Down
Loading