Skip to content

Commit

Permalink
fix: rustdoc warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
han0110 committed Jan 20, 2023
1 parent 5023293 commit 8cc0b15
Show file tree
Hide file tree
Showing 9 changed files with 14 additions and 12 deletions.
2 changes: 1 addition & 1 deletion snark-verifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
clippy::too_many_arguments,
clippy::upper_case_acronyms
)]
#![deny(missing_debug_implementations, missing_docs, unsafe_code)]
#![deny(missing_debug_implementations, missing_docs, unsafe_code, rustdoc::all)]

pub mod cost;
pub mod loader;
Expand Down
5 changes: 3 additions & 2 deletions snark-verifier/src/loader/evm/util/executor.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
//! Copied and modified from https://github.com/foundry-rs/foundry/blob/master/evm/src/executor/mod.rs
//! Copied and modified from
//! <https://github.com/foundry-rs/foundry/blob/master/evm/src/executor/mod.rs>
use crate::loader::evm::{Address, H256, U256};
use bytes::Bytes;
Expand Down Expand Up @@ -725,7 +726,7 @@ impl ExecutorBuilder {
self
}

/// Initialize an [`Executor`].
/// Initialize an `Executor`.
pub fn build(self) -> Executor {
Executor::new(self.debugger, self.gas_limit.unwrap_or(U256::MAX))
}
Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/pcs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,7 @@ where
type Accumulator: Clone + Debug;

/// Decode an [`AccumulatorEncoding::Accumulator`] from serveral
/// [`Loader::LoadedScalar`]s.
/// [`crate::loader::ScalarLoader::LoadedScalar`]s.
fn from_repr(repr: &[&L::LoadedScalar]) -> Result<Self::Accumulator, Error>;
}

Expand Down
4 changes: 2 additions & 2 deletions snark-verifier/src/pcs/ipa.rs
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//! Inner product argument polynomial commitment scheme and accumulation scheme.
//! The notations are following https://eprint.iacr.org/2020/499.pdf.
//! The notations are following <https://eprint.iacr.org/2020/499.pdf>.
use crate::{
loader::{native::NativeLoader, LoadedScalar, Loader, ScalarLoader},
Expand Down Expand Up @@ -311,7 +311,7 @@ where
}
}

/// Read [`AccumulationScheme::Proof`] from transcript.
/// Read [`crate::pcs::AccumulationScheme::Proof`] from transcript.
pub fn read<T>(svk: &IpaSuccinctVerifyingKey<C>, transcript: &mut T) -> Result<Self, Error>
where
T: TranscriptRead<C, L>,
Expand Down
3 changes: 2 additions & 1 deletion snark-verifier/src/pcs/ipa/multiopen/bgh19.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,8 @@ use std::{
};

/// Verifier of multi-open inner product argument. It is for the implementation
/// in [`halo2_proofs`], which is previously https://eprint.iacr.org/2019/1021.
/// in [`halo2_proofs`], which is previously <https://eprint.iacr.org/2019/1021>
/// .
#[derive(Clone, Debug)]
pub struct Bgh19;

Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/pcs/kzg/multiopen/bdfg21.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::{

/// Verifier of multi-open KZG. It is for the SHPLONK implementation
/// in [`halo2_proofs`].
/// Notations are following https://eprint.iacr.org/2020/081.
/// Notations are following <https://eprint.iacr.org/2020/081>.
#[derive(Clone, Debug)]
pub struct Bdfg21;

Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/pcs/kzg/multiopen/gwc19.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ use crate::{

/// Verifier of multi-open KZG. It is for the GWC implementation
/// in [`halo2_proofs`].
/// Notations are following https://eprint.iacr.org/2019/953.pdf.
/// Notations are following <https://eprint.iacr.org/2019/953.pdf>.
#[derive(Clone, Debug)]
pub struct Gwc19;

Expand Down
4 changes: 2 additions & 2 deletions snark-verifier/src/system/halo2/transcript/halo2.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ where
R: Read,
EccChip: NativeEncoding<'a, C>,
{
/// Initialize [`EvmTranscript`] given [`Rc<Halo2Loader>`].
/// Initialize [`PoseidonTranscript`] given [`Rc<Halo2Loader>`].
pub fn new(loader: &Rc<Halo2Loader<'a, C, EccChip>>, stream: Value<R>) -> Self {
let buf = Poseidon::new(loader, R_F, R_P);
Self {
Expand Down Expand Up @@ -157,7 +157,7 @@ where
impl<C: CurveAffine, S, const T: usize, const RATE: usize, const R_F: usize, const R_P: usize>
PoseidonTranscript<C, NativeLoader, S, T, RATE, R_F, R_P>
{
/// Initialize [`EvmTranscript`] given readable or writeable stream for
/// Initialize [`PoseidonTranscript`] given readable or writeable stream for
/// verifying or proving with [`NativeLoader`].
pub fn new(stream: S) -> Self {
Self {
Expand Down
2 changes: 1 addition & 1 deletion snark-verifier/src/util/msm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ fn multi_scalar_multiplication_serial<C: CurveAffine>(
}

/// Multi-scalar multiplication algorithm copied from
/// https://github.com/zcash/halo2/blob/main/halo2_proofs/src/arithmetic.rs.
/// <https://github.com/zcash/halo2/blob/main/halo2_proofs/src/arithmetic.rs>.
pub fn multi_scalar_multiplication<C: CurveAffine>(scalars: &[C::Scalar], bases: &[C]) -> C::Curve {
assert_eq!(scalars.len(), bases.len());

Expand Down

0 comments on commit 8cc0b15

Please sign in to comment.