[INFO] crate zkp-merkle-tree 0.1.0 is already in cache [INFO] documenting zkp-merkle-tree-0.1.0 against master#394e1b40d264aa6928811919c1124fa248e7d802 for pr-73566 [INFO] extracting crate zkp-merkle-tree 0.1.0 into /workspace/builds/worker-11/source [INFO] validating manifest of crates.io crate zkp-merkle-tree 0.1.0 on toolchain 394e1b40d264aa6928811919c1124fa248e7d802 [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "read-manifest" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] started tweaking crates.io crate zkp-merkle-tree 0.1.0 [INFO] finished tweaking crates.io crate zkp-merkle-tree 0.1.0 [INFO] tweaked toml for crates.io crate zkp-merkle-tree 0.1.0 written to /workspace/builds/worker-11/source/Cargo.toml [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "generate-lockfile" "--manifest-path" "Cargo.toml" "-Zno-index-update", kill_on_drop: false }` [INFO] running `Command { std: "/workspace/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "fetch" "--locked" "--manifest-path" "Cargo.toml", kill_on_drop: false }` [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "metadata" "--no-deps" "--format-version=1", kill_on_drop: false }` [INFO] [stdout] 96d29fc373739b39ae43a441b73c566896325232153824eb630f5662c0579a17 [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "96d29fc373739b39ae43a441b73c566896325232153824eb630f5662c0579a17", kill_on_drop: false }` [INFO] running `Command { std: "docker" "inspect" "96d29fc373739b39ae43a441b73c566896325232153824eb630f5662c0579a17", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "96d29fc373739b39ae43a441b73c566896325232153824eb630f5662c0579a17", kill_on_drop: false }` [INFO] [stdout] 96d29fc373739b39ae43a441b73c566896325232153824eb630f5662c0579a17 [INFO] running `Command { std: "docker" "create" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/target:/opt/rustwide/target:rw,Z" "-v" "/var/lib/crater-agent-workspace/builds/worker-11/source:/opt/rustwide/workdir:ro,Z" "-v" "/var/lib/crater-agent-workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/var/lib/crater-agent-workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=0" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "CARGO_INCREMENTAL=0" "-e" "RUST_BACKTRACE=full" "-e" "RUSTDOCFLAGS=--cap-lints=forbid" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "1610612736" "--network" "none" "rustops/crates-build-env@sha256:819119df93c0f5eca3f29186f14981ef29945a311854d7222af07488600a2584" "/opt/rustwide/cargo-home/bin/cargo" "+394e1b40d264aa6928811919c1124fa248e7d802" "doc" "--frozen" "--no-deps" "--document-private-items" "--message-format=json", kill_on_drop: false }` [INFO] [stdout] b1d094fae1c7ceef273691928dca3464081bcd642953bd4ff9aad19967b419ba [INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap. [INFO] running `Command { std: "docker" "start" "-a" "b1d094fae1c7ceef273691928dca3464081bcd642953bd4ff9aad19967b419ba", kill_on_drop: false }` [INFO] [stderr] Checking cfg-if v0.1.10 [INFO] [stderr] Compiling unicode-xid v0.2.1 [INFO] [stderr] Compiling syn v1.0.33 [INFO] [stderr] Compiling getrandom v0.1.14 [INFO] [stderr] Compiling hex v0.4.2 [INFO] [stderr] Compiling crunchy v0.2.2 [INFO] [stderr] Compiling proc-macro-hack v0.5.16 [INFO] [stderr] Checking no-std-compat v0.1.1 [INFO] [stderr] Checking ppv-lite86 v0.2.8 [INFO] [stderr] Compiling log v0.4.8 [INFO] [stderr] Checking zkp-error-utils v0.1.0 [INFO] [stderr] Checking itertools v0.8.2 [INFO] [stderr] Checking memmap v0.7.0 [INFO] [stderr] Checking crossbeam-utils v0.7.2 [INFO] [stderr] Compiling proc-macro2 v1.0.18 [INFO] [stderr] Checking rand_core v0.5.1 [INFO] [stderr] Checking tiny-keccak v1.5.0 [INFO] [stderr] Checking crossbeam-epoch v0.8.2 [INFO] [stderr] Checking crossbeam-queue v0.2.3 [INFO] [stderr] Checking rand_chacha v0.2.2 [INFO] [stderr] Compiling quote v1.0.7 [INFO] [stderr] Checking crossbeam-deque v0.7.3 [INFO] [stderr] Checking rand v0.7.3 [INFO] [stderr] Checking rayon-core v1.7.1 [INFO] [stderr] Checking rayon v1.3.1 [INFO] [stderr] Checking tempfile v3.1.0 [INFO] [stderr] Checking zkp-mmap-vec v0.1.0 [INFO] [stderr] Compiling zkp-macros-lib v0.1.0 [INFO] [stderr] Compiling zkp-macros-impl v0.1.0 [INFO] [stderr] Checking zkp-macros-decl v0.1.0 [INFO] [stderr] Checking zkp-u256 v0.1.1 [INFO] [stderr] Checking zkp-primefield v0.1.1 [INFO] [stderr] Checking zkp-hash v0.1.0 [INFO] [stderr] Documenting zkp-merkle-tree v0.1.0 (/opt/rustwide/workdir) [INFO] [stdout] warning: documentation test in private item [INFO] [stdout] --> src/index.rs:10:1 [INFO] [stdout] | [INFO] [stdout] 10 | / /// Index into a balanced binary tree [INFO] [stdout] 11 | | /// [INFO] [stdout] 12 | | /// The index has two representations, as a (depth, offset) pair and as an [INFO] [stdout] 13 | | /// index. [INFO] [stdout] ... | [INFO] [stdout] 29 | | /// and nodes in the tree. Nodes are indexed in breadth-first order, starting [INFO] [stdout] 30 | | /// with the root at 0. [INFO] [stdout] | |_______________________^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | private_doc_tests, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | / #![cfg_attr(not(feature = "std"), no_std)] [INFO] [stdout] 6 | | #![forbid(unsafe_code)] [INFO] [stdout] 7 | | #![warn( [INFO] [stdout] 8 | | // Enable sets of warnings [INFO] [stdout] ... | [INFO] [stdout] 71 | | use index::Index; [INFO] [stdout] 72 | | use node::Node; [INFO] [stdout] | |_______________^ [INFO] [stdout] | [INFO] [stdout] note: the lint level is defined here [INFO] [stdout] --> src/lib.rs:29:5 [INFO] [stdout] | [INFO] [stdout] 29 | missing_doc_code_examples, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:9:1 [INFO] [stdout] | [INFO] [stdout] 9 | / pub struct Commitment { [INFO] [stdout] 10 | | size: usize, [INFO] [stdout] 11 | | hash: Hash, [INFO] [stdout] 12 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | size: usize, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | hash: Hash, [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / pub struct Proof { [INFO] [stdout] 12 | | commitment: Commitment, [INFO] [stdout] 13 | | indices: Vec, [INFO] [stdout] 14 | | hashes: Vec, [INFO] [stdout] 15 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | commitment: Commitment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | indices: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | hashes: Vec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:37:1 [INFO] [stdout] | [INFO] [stdout] 37 | / /// Merkle tree [INFO] [stdout] 38 | | /// [INFO] [stdout] 39 | | /// The tree will become the owner of the `Container`. This is necessary because [INFO] [stdout] 40 | | /// when low layer-omission is implemented we need immutable access to the [INFO] [stdout] 41 | | /// leaves. If shared ownership is required the `Container` can be an `Rc<_>`. [INFO] [stdout] | |______________________________________________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | commitment: Commitment, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:48:5 [INFO] [stdout] | [INFO] [stdout] 48 | nodes: MmapVec, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | leaves: Container, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / pub enum Error { [INFO] [stdout] 8 | | TreeToLarge, [INFO] [stdout] 9 | | NumLeavesNotPowerOfTwo, [INFO] [stdout] 10 | | IndexOutOfRange, [INFO] [stdout] ... | [INFO] [stdout] 14 | | RootHashMismatch, [INFO] [stdout] 15 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | TreeToLarge, [INFO] [stdout] | ^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:9:5 [INFO] [stdout] | [INFO] [stdout] 9 | NumLeavesNotPowerOfTwo, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:10:5 [INFO] [stdout] | [INFO] [stdout] 10 | IndexOutOfRange, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:11:5 [INFO] [stdout] | [INFO] [stdout] 11 | IndicesUnsortedOrDuplicate, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:12:5 [INFO] [stdout] | [INFO] [stdout] 12 | DuplicateLeafMismatch, [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | NotEnoughHashes, [INFO] [stdout] | ^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:14:5 [INFO] [stdout] | [INFO] [stdout] 14 | RootHashMismatch, [INFO] [stdout] | ^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use crate::{Error, Index, Result}; [INFO] [stdout] 2 | | use itertools::Itertools; [INFO] [stdout] 3 | | use std::prelude::v1::*; [INFO] [stdout] 4 | | use zkp_error_utils::require; [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:14:1 [INFO] [stdout] | [INFO] [stdout] 14 | / impl Commitment { [INFO] [stdout] 15 | | pub fn from_size_hash(size: usize, hash: &Hash) -> Result { [INFO] [stdout] 16 | | require!( [INFO] [stdout] 17 | | size == 0 || size.is_power_of_two(), [INFO] [stdout] ... | [INFO] [stdout] 60 | | } [INFO] [stdout] 61 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | / pub fn from_size_hash(size: usize, hash: &Hash) -> Result { [INFO] [stdout] 16 | | require!( [INFO] [stdout] 17 | | size == 0 || size.is_power_of_two(), [INFO] [stdout] 18 | | Error::NumLeavesNotPowerOfTwo [INFO] [stdout] ... | [INFO] [stdout] 23 | | }) [INFO] [stdout] 24 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:26:5 [INFO] [stdout] | [INFO] [stdout] 26 | / pub fn size(&self) -> usize { [INFO] [stdout] 27 | | self.size [INFO] [stdout] 28 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:30:5 [INFO] [stdout] | [INFO] [stdout] 30 | / pub fn hash(&self) -> &Hash { [INFO] [stdout] 31 | | &self.hash [INFO] [stdout] 32 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / /// Convert leaf indices to a sorted list of unique `Index`s and validates [INFO] [stdout] 35 | | /// their range. [INFO] [stdout] | |____________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/commitment.rs:46:5 [INFO] [stdout] | [INFO] [stdout] 46 | /// The number of hashes in the proof for the given set of indices. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/lib.rs:44:1 [INFO] [stdout] | [INFO] [stdout] 44 | / /// Implements Vector Commitments using Merkle Trees. [INFO] [stdout] 45 | | /// [INFO] [stdout] 46 | | /// [INFO] [stdout] | |__________________________________________^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:36:18 [INFO] [stdout] | [INFO] [stdout] 36 | pub struct Index(usize); [INFO] [stdout] | ^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:191:1 [INFO] [stdout] | [INFO] [stdout] 191 | / pub struct LayerIter { [INFO] [stdout] 192 | | size: usize, [INFO] [stdout] 193 | | offset: usize, [INFO] [stdout] 194 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:192:5 [INFO] [stdout] | [INFO] [stdout] 192 | size: usize, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:193:5 [INFO] [stdout] | [INFO] [stdout] 193 | offset: usize, [INFO] [stdout] | ^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | const USIZE_BITS: usize = 0_usize.count_zeros() as usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:38:1 [INFO] [stdout] | [INFO] [stdout] 38 | / impl Index { [INFO] [stdout] 39 | | pub const fn max_size() -> usize { [INFO] [stdout] 40 | | 1_usize << (USIZE_BITS - 1) [INFO] [stdout] 41 | | } [INFO] [stdout] ... | [INFO] [stdout] 180 | | } [INFO] [stdout] 181 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / pub const fn max_size() -> usize { [INFO] [stdout] 40 | | 1_usize << (USIZE_BITS - 1) [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / pub const fn size_at_depth(depth: usize) -> usize { [INFO] [stdout] 44 | | // Note: We can not do checks in a `const fn`. [INFO] [stdout] 45 | | // assert!(depth < USIZE_BITS); [INFO] [stdout] 46 | | 1_usize << depth [INFO] [stdout] 47 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:49:5 [INFO] [stdout] | [INFO] [stdout] 49 | / pub fn depth_for_size(size: usize) -> usize { [INFO] [stdout] 50 | | // TODO: Add checks [INFO] [stdout] 51 | | size.next_power_of_two().trailing_zeros() as usize [INFO] [stdout] 52 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:54:5 [INFO] [stdout] | [INFO] [stdout] 54 | / pub const fn root() -> Self { [INFO] [stdout] 55 | | Self(1) [INFO] [stdout] 56 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:58:5 [INFO] [stdout] | [INFO] [stdout] 58 | / pub const fn from_index(index: usize) -> Self { [INFO] [stdout] 59 | | Self(index + 1) [INFO] [stdout] 60 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:62:5 [INFO] [stdout] | [INFO] [stdout] 62 | / pub fn iter_layer(depth: usize) -> LayerIter { [INFO] [stdout] 63 | | LayerIter { [INFO] [stdout] 64 | | size: 1_usize << depth, [INFO] [stdout] 65 | | offset: 0, [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:69:5 [INFO] [stdout] | [INFO] [stdout] 69 | / pub fn layer_range(depth: usize) -> RangeInclusive { [INFO] [stdout] 70 | | // TODO: Overflow check [INFO] [stdout] 71 | | let start = Self::from_depth_offset(depth, 0).unwrap(); [INFO] [stdout] 72 | | let end = Self::from_depth_offset(depth, Self::size_at_depth(depth) - 1).unwrap(); [INFO] [stdout] 73 | | start.as_index()..=end.as_index() [INFO] [stdout] 74 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:77:5 [INFO] [stdout] | [INFO] [stdout] 77 | / pub fn from_size_offset(size: usize, offset: usize) -> Result { [INFO] [stdout] 78 | | require!(size.is_power_of_two(), Error::NumLeavesNotPowerOfTwo); [INFO] [stdout] 79 | | require!(size <= Self::max_size(), Error::TreeToLarge); [INFO] [stdout] 80 | | require!(offset < size, Error::IndexOutOfRange); [INFO] [stdout] 81 | | Ok(Self(size | offset)) [INFO] [stdout] 82 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:84:5 [INFO] [stdout] | [INFO] [stdout] 84 | / pub fn from_depth_offset(depth: usize, offset: usize) -> Result { [INFO] [stdout] 85 | | Self::from_size_offset(Self::size_at_depth(depth), offset) [INFO] [stdout] 86 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:88:5 [INFO] [stdout] | [INFO] [stdout] 88 | / pub fn as_index(self) -> usize { [INFO] [stdout] 89 | | self.0 - 1 [INFO] [stdout] 90 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:92:5 [INFO] [stdout] | [INFO] [stdout] 92 | / pub fn depth(self) -> usize { [INFO] [stdout] 93 | | let next_layer = (self.0 + 1).next_power_of_two(); [INFO] [stdout] 94 | | // Usize should always be able to hold it's number of bits [INFO] [stdout] 95 | | let next_depth = usize::try_from(next_layer.trailing_zeros()).unwrap(); [INFO] [stdout] 96 | | next_depth - 1 [INFO] [stdout] 97 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:99:5 [INFO] [stdout] | [INFO] [stdout] 99 | / pub fn offset(self) -> usize { [INFO] [stdout] 100 | | self.0 - (1_usize << self.depth()) [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:103:5 [INFO] [stdout] | [INFO] [stdout] 103 | / pub fn is_root(self) -> bool { [INFO] [stdout] 104 | | self.0 == 1 [INFO] [stdout] 105 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:107:5 [INFO] [stdout] | [INFO] [stdout] 107 | / pub fn is_left(self) -> bool { [INFO] [stdout] 108 | | self.0 % 2 == 0 [INFO] [stdout] 109 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:111:5 [INFO] [stdout] | [INFO] [stdout] 111 | / pub fn is_right(self) -> bool { [INFO] [stdout] 112 | | self.0 != 1 && self.0 % 2 == 1 [INFO] [stdout] 113 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:115:5 [INFO] [stdout] | [INFO] [stdout] 115 | / pub fn is_left_most(self) -> bool { [INFO] [stdout] 116 | | self.0.is_power_of_two() [INFO] [stdout] 117 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:119:5 [INFO] [stdout] | [INFO] [stdout] 119 | / pub fn is_right_most(self) -> bool { [INFO] [stdout] 120 | | (self.0 + 1).is_power_of_two() [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | / pub fn parent(self) -> Option { [INFO] [stdout] 124 | | if self.is_root() { [INFO] [stdout] 125 | | None [INFO] [stdout] 126 | | } else { [INFO] [stdout] 127 | | Some(Self(self.0 >> 1)) [INFO] [stdout] 128 | | } [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / pub fn sibling(self) -> Option { [INFO] [stdout] 132 | | if self.is_root() { [INFO] [stdout] 133 | | None [INFO] [stdout] 134 | | } else { [INFO] [stdout] 135 | | Some(Self(self.0 ^ 1)) [INFO] [stdout] 136 | | } [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | / pub fn left_neighbor(self) -> Option { [INFO] [stdout] 140 | | if self.is_left_most() { [INFO] [stdout] 141 | | None [INFO] [stdout] 142 | | } else { [INFO] [stdout] 143 | | Some(Self(self.0 - 1)) [INFO] [stdout] 144 | | } [INFO] [stdout] 145 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:147:5 [INFO] [stdout] | [INFO] [stdout] 147 | / pub fn right_neighbor(self) -> Option { [INFO] [stdout] 148 | | if self.is_right_most() { [INFO] [stdout] 149 | | None [INFO] [stdout] 150 | | } else { [INFO] [stdout] 151 | | Some(Self(self.0 + 1)) [INFO] [stdout] 152 | | } [INFO] [stdout] 153 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:155:5 [INFO] [stdout] | [INFO] [stdout] 155 | / pub fn left_child(self) -> Self { [INFO] [stdout] 156 | | Self(self.0 << 1) [INFO] [stdout] 157 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:159:5 [INFO] [stdout] | [INFO] [stdout] 159 | / pub fn right_child(self) -> Self { [INFO] [stdout] 160 | | Self((self.0 << 1) | 1) [INFO] [stdout] 161 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:163:5 [INFO] [stdout] | [INFO] [stdout] 163 | / pub fn last_common_ancestor(self, other: Self) -> Self { [INFO] [stdout] 164 | | // Align their first bits all the way to the left [INFO] [stdout] 165 | | let a = self.0 << self.0.leading_zeros(); [INFO] [stdout] 166 | | let b = other.0 << other.0.leading_zeros(); [INFO] [stdout] ... | [INFO] [stdout] 171 | | Self(prefix) [INFO] [stdout] 172 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:174:5 [INFO] [stdout] | [INFO] [stdout] 174 | /// Concatenate `other`'s path to ours. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use zkp_hash::{Hash, Hashable, MaskedKeccak}; [INFO] [stdout] 2 | | [INFO] [stdout] 3 | | #[derive(Clone)] [INFO] [stdout] 4 | | #[cfg_attr(feature = "std", derive(Debug))] [INFO] [stdout] ... | [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:5:1 [INFO] [stdout] | [INFO] [stdout] 5 | pub(crate) struct Node<'a>(pub(crate) &'a Hash, pub(crate) &'a Hash); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:5:28 [INFO] [stdout] | [INFO] [stdout] 5 | pub(crate) struct Node<'a>(pub(crate) &'a Hash, pub(crate) &'a Hash); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:5:49 [INFO] [stdout] | [INFO] [stdout] 5 | pub(crate) struct Node<'a>(pub(crate) &'a Hash, pub(crate) &'a Hash); [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use crate::{Commitment, Error, Index, Node, Result}; [INFO] [stdout] 2 | | use itertools::Itertools; [INFO] [stdout] 3 | | use std::{collections::VecDeque, prelude::v1::*}; [INFO] [stdout] 4 | | use zkp_error_utils::require; [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / impl Proof { [INFO] [stdout] 18 | | pub fn from_hashes( [INFO] [stdout] 19 | | commitment: &Commitment, [INFO] [stdout] 20 | | indices: &[usize], [INFO] [stdout] ... | [INFO] [stdout] 101 | | } [INFO] [stdout] 102 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / pub fn from_hashes( [INFO] [stdout] 19 | | commitment: &Commitment, [INFO] [stdout] 20 | | indices: &[usize], [INFO] [stdout] 21 | | hashes: &[Hash], [INFO] [stdout] ... | [INFO] [stdout] 33 | | }) [INFO] [stdout] 34 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:36:5 [INFO] [stdout] | [INFO] [stdout] 36 | / pub fn hashes(&self) -> &[Hash] { [INFO] [stdout] 37 | | &self.hashes [INFO] [stdout] 38 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/proof.rs:40:5 [INFO] [stdout] | [INFO] [stdout] 40 | / pub fn verify(&self, leafs: &[(usize, Leaf)]) -> Result<()> { [INFO] [stdout] 41 | | // TODO: Pass leafs by reference? [INFO] [stdout] 42 | | // TODO: Check if the indices line up. [INFO] [stdout] 43 | | [INFO] [stdout] ... | [INFO] [stdout] 100 | | Ok(()) [INFO] [stdout] 101 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / #[cfg(feature = "std")] [INFO] [stdout] 2 | | use std::error; [INFO] [stdout] 3 | | use std::fmt; [INFO] [stdout] 4 | | pub type Result = std::result::Result; [INFO] [stdout] ... | [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:4:1 [INFO] [stdout] | [INFO] [stdout] 4 | pub type Result = std::result::Result; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use crate::{Commitment, Error, Index, Node, Proof, Result, VectorCommitment}; [INFO] [stdout] 2 | | use std::collections::VecDeque; [INFO] [stdout] 3 | | use zkp_error_utils::require; [INFO] [stdout] 4 | | use zkp_hash::{Hash, Hashable}; [INFO] [stdout] ... | [INFO] [stdout] 289 | | } [INFO] [stdout] 290 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:11:1 [INFO] [stdout] | [INFO] [stdout] 11 | / fn for_each(slice: &mut [Hash], f: F) [INFO] [stdout] 12 | | where [INFO] [stdout] 13 | | F: Fn((usize, &mut Hash)) -> () + Sync + Send, [INFO] [stdout] 14 | | { [INFO] [stdout] ... | [INFO] [stdout] 19 | | slice.iter_mut().enumerate().for_each(f); [INFO] [stdout] 20 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:23:1 [INFO] [stdout] | [INFO] [stdout] 23 | / fn compute(leaves: &C, index: Index) -> Hash { [INFO] [stdout] 24 | | let leaf_depth = Index::depth_for_size(leaves.len()); [INFO] [stdout] 25 | | assert!(index.depth() <= leaf_depth); [INFO] [stdout] 26 | | if index.depth() == leaf_depth { [INFO] [stdout] ... | [INFO] [stdout] 34 | | } [INFO] [stdout] 35 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:52:1 [INFO] [stdout] | [INFO] [stdout] 52 | / impl Tree { [INFO] [stdout] 53 | | pub fn from_leaves(leaves: Container) -> Result { [INFO] [stdout] 54 | | Self::from_leaves_skip_layers(leaves, 1) [INFO] [stdout] 55 | | } [INFO] [stdout] ... | [INFO] [stdout] 185 | | } [INFO] [stdout] 186 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:53:5 [INFO] [stdout] | [INFO] [stdout] 53 | / pub fn from_leaves(leaves: Container) -> Result { [INFO] [stdout] 54 | | Self::from_leaves_skip_layers(leaves, 1) [INFO] [stdout] 55 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:57:5 [INFO] [stdout] | [INFO] [stdout] 57 | / pub fn from_leaves_skip_layers(leaves: Container, skip_layers: usize) -> Result { [INFO] [stdout] 58 | | let size = leaves.len(); [INFO] [stdout] 59 | | if size == 0 { [INFO] [stdout] 60 | | return Ok(Self { [INFO] [stdout] ... | [INFO] [stdout] 120 | | }) [INFO] [stdout] 121 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:123:5 [INFO] [stdout] | [INFO] [stdout] 123 | / pub fn commitment(&self) -> &Commitment { [INFO] [stdout] 124 | | &self.commitment [INFO] [stdout] 125 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:127:5 [INFO] [stdout] | [INFO] [stdout] 127 | / pub fn leaf_depth(&self) -> usize { [INFO] [stdout] 128 | | Index::depth_for_size(self.leaves().len()) [INFO] [stdout] 129 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:131:5 [INFO] [stdout] | [INFO] [stdout] 131 | / pub fn leaves(&self) -> &Container { [INFO] [stdout] 132 | | &self.leaves [INFO] [stdout] 133 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:135:5 [INFO] [stdout] | [INFO] [stdout] 135 | / pub fn leaf(&self, index: usize) -> Container::Leaf { [INFO] [stdout] 136 | | self.leaves.leaf(index) [INFO] [stdout] 137 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:139:5 [INFO] [stdout] | [INFO] [stdout] 139 | / pub fn node_hash(&self, index: Index) -> Hash { [INFO] [stdout] 140 | | if index.as_index() < self.nodes.len() { [INFO] [stdout] 141 | | self.nodes[index.as_index()].clone() [INFO] [stdout] 142 | | } else { [INFO] [stdout] ... | [INFO] [stdout] 153 | | } [INFO] [stdout] 154 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/tree.rs:156:5 [INFO] [stdout] | [INFO] [stdout] 156 | / pub fn open(&self, indices: &[usize]) -> Result { [INFO] [stdout] 157 | | let indices = self.commitment().sort_indices(indices)?; [INFO] [stdout] 158 | | let proof_indices: Vec = indices.iter().map(|i| i.offset()).collect(); [INFO] [stdout] 159 | | let mut indices: VecDeque = indices.into_iter().collect(); [INFO] [stdout] ... | [INFO] [stdout] 184 | | Proof::from_hashes(self.commitment(), &proof_indices, &hashes) [INFO] [stdout] 185 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:1:1 [INFO] [stdout] | [INFO] [stdout] 1 | / use crate::{Commitment, Result, Tree}; [INFO] [stdout] 2 | | use std::prelude::v1::*; [INFO] [stdout] 3 | | use zkp_hash::{Hash, Hashable}; [INFO] [stdout] 4 | | [INFO] [stdout] ... | [INFO] [stdout] 66 | | } [INFO] [stdout] 67 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:8:1 [INFO] [stdout] | [INFO] [stdout] 8 | / pub trait VectorCommitment [INFO] [stdout] 9 | | where [INFO] [stdout] 10 | | Self: Sync + Sized, [INFO] [stdout] 11 | | Self::Leaf: Sync + Hashable, [INFO] [stdout] ... | [INFO] [stdout] 31 | | } [INFO] [stdout] 32 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:13:5 [INFO] [stdout] | [INFO] [stdout] 13 | type Leaf; [INFO] [stdout] | ^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:15:5 [INFO] [stdout] | [INFO] [stdout] 15 | fn len(&self) -> usize; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:17:5 [INFO] [stdout] | [INFO] [stdout] 17 | / fn is_empty(&self) -> bool { [INFO] [stdout] 18 | | self.len() == 0 [INFO] [stdout] 19 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:21:5 [INFO] [stdout] | [INFO] [stdout] 21 | fn leaf(&self, index: usize) -> Self::Leaf; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:23:5 [INFO] [stdout] | [INFO] [stdout] 23 | / fn leaf_hash(&self, index: usize) -> Hash { [INFO] [stdout] 24 | | self.leaf(index).hash() [INFO] [stdout] 25 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:27:5 [INFO] [stdout] | [INFO] [stdout] 27 | / fn commit(self) -> Result<(Commitment, Tree)> { [INFO] [stdout] 28 | | let tree = Tree::from_leaves(self)?; [INFO] [stdout] 29 | | let commitment = tree.commitment().clone(); [INFO] [stdout] 30 | | Ok((commitment, tree)) [INFO] [stdout] 31 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:36:1 [INFO] [stdout] | [INFO] [stdout] 36 | / impl VectorCommitment for Vec { [INFO] [stdout] 37 | | type Leaf = Leaf; [INFO] [stdout] 38 | | [INFO] [stdout] 39 | | fn len(&self) -> usize { [INFO] [stdout] ... | [INFO] [stdout] 49 | | } [INFO] [stdout] 50 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:37:5 [INFO] [stdout] | [INFO] [stdout] 37 | type Leaf = Leaf; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:39:5 [INFO] [stdout] | [INFO] [stdout] 39 | / fn len(&self) -> usize { [INFO] [stdout] 40 | | Self::len(self) [INFO] [stdout] 41 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:43:5 [INFO] [stdout] | [INFO] [stdout] 43 | / fn leaf(&self, index: usize) -> Self::Leaf { [INFO] [stdout] 44 | | self[index].clone() [INFO] [stdout] 45 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/vector_commitment.rs:47:5 [INFO] [stdout] | [INFO] [stdout] 47 | / fn leaf_hash(&self, index: usize) -> Hash { [INFO] [stdout] 48 | | self[index].hash() [INFO] [stdout] 49 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:196:1 [INFO] [stdout] | [INFO] [stdout] 196 | /// Iterating on an Index will go right until the end of the layer. [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:198:5 [INFO] [stdout] | [INFO] [stdout] 198 | type Item = Index; [INFO] [stdout] | ^^^^^^^^^^^^^^^^^^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:200:5 [INFO] [stdout] | [INFO] [stdout] 200 | / fn next(&mut self) -> Option { [INFO] [stdout] 201 | | if self.offset < self.size { [INFO] [stdout] 202 | | let item = Index::from_size_offset(self.size, self.offset).unwrap(); [INFO] [stdout] 203 | | self.offset += 1; [INFO] [stdout] ... | [INFO] [stdout] 207 | | } [INFO] [stdout] 208 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:184:1 [INFO] [stdout] | [INFO] [stdout] 184 | / impl fmt::Debug for Index { [INFO] [stdout] 185 | | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { [INFO] [stdout] 186 | | write!(f, "Index({:}, {:})", self.depth(), self.offset()) [INFO] [stdout] 187 | | } [INFO] [stdout] 188 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/index.rs:185:5 [INFO] [stdout] | [INFO] [stdout] 185 | / fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { [INFO] [stdout] 186 | | write!(f, "Index({:}, {:})", self.depth(), self.offset()) [INFO] [stdout] 187 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:17:1 [INFO] [stdout] | [INFO] [stdout] 17 | / impl fmt::Display for Error { [INFO] [stdout] 18 | | fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { [INFO] [stdout] 19 | | use Error::*; [INFO] [stdout] 20 | | match *self { [INFO] [stdout] ... | [INFO] [stdout] 29 | | } [INFO] [stdout] 30 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:18:5 [INFO] [stdout] | [INFO] [stdout] 18 | / fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result { [INFO] [stdout] 19 | | use Error::*; [INFO] [stdout] 20 | | match *self { [INFO] [stdout] 21 | | TreeToLarge => write!(f, "Tree too large"), [INFO] [stdout] ... | [INFO] [stdout] 28 | | } [INFO] [stdout] 29 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:33:1 [INFO] [stdout] | [INFO] [stdout] 33 | / impl error::Error for Error { [INFO] [stdout] 34 | | fn source(&self) -> Option<&(dyn error::Error + 'static)> { [INFO] [stdout] 35 | | match *self { [INFO] [stdout] 36 | | _ => None, [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] 39 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/result.rs:34:5 [INFO] [stdout] | [INFO] [stdout] 34 | / fn source(&self) -> Option<&(dyn error::Error + 'static)> { [INFO] [stdout] 35 | | match *self { [INFO] [stdout] 36 | | _ => None, [INFO] [stdout] 37 | | } [INFO] [stdout] 38 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:7:1 [INFO] [stdout] | [INFO] [stdout] 7 | / impl Hashable for Node<'_> { [INFO] [stdout] 8 | | fn hash(&self) -> Hash { [INFO] [stdout] 9 | | let mut hasher = MaskedKeccak::new(); [INFO] [stdout] 10 | | hasher.update(self.0.as_bytes()); [INFO] [stdout] ... | [INFO] [stdout] 13 | | } [INFO] [stdout] 14 | | } [INFO] [stdout] | |_^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: missing code example in this documentation [INFO] [stdout] --> src/node.rs:8:5 [INFO] [stdout] | [INFO] [stdout] 8 | / fn hash(&self) -> Hash { [INFO] [stdout] 9 | | let mut hasher = MaskedKeccak::new(); [INFO] [stdout] 10 | | hasher.update(self.0.as_bytes()); [INFO] [stdout] 11 | | hasher.update(self.1.as_bytes()); [INFO] [stdout] 12 | | hasher.hash() [INFO] [stdout] 13 | | } [INFO] [stdout] | |_____^ [INFO] [stdout] [INFO] [stdout] [INFO] [stdout] warning: 107 warnings emitted [INFO] [stdout] [INFO] [stdout] [INFO] [stderr] Finished dev [unoptimized + debuginfo] target(s) in 20.35s [INFO] running `Command { std: "docker" "inspect" "b1d094fae1c7ceef273691928dca3464081bcd642953bd4ff9aad19967b419ba", kill_on_drop: false }` [INFO] running `Command { std: "docker" "rm" "-f" "b1d094fae1c7ceef273691928dca3464081bcd642953bd4ff9aad19967b419ba", kill_on_drop: false }` [INFO] [stdout] b1d094fae1c7ceef273691928dca3464081bcd642953bd4ff9aad19967b419ba