zkp-mmap-vec 0.1.0

Replacement for `Vec` that uses file-backed storage
Documentation
Build #189788 2019-10-07T04:15:14.768894+00:00
# rustc version
rustc 1.39.0-nightly (66bf391c3 2019-09-23)# docs.rs version
docsrs 0.6.0 (0868fa4 2019-10-01)# build log
[INFO] running `"docker" "create" "-v" "/home/cratesfyi/workspace/builds/zkp-mmap-vec-0.1.0/target:/opt/rustwide/target:rw,Z" "-v" "/home/cratesfyi/workspace/builds/zkp-mmap-vec-0.1.0/source:/opt/rustwide/workdir:ro,Z" "-v" "/home/cratesfyi/workspace/cargo-home:/opt/rustwide/cargo-home:ro,Z" "-v" "/home/cratesfyi/workspace/rustup-home:/opt/rustwide/rustup-home:ro,Z" "-e" "SOURCE_DIR=/opt/rustwide/workdir" "-e" "MAP_USER_ID=1001" "-e" "CARGO_TARGET_DIR=/opt/rustwide/target" "-e" "RUSTFLAGS=" "-e" "RUSTDOCFLAGS=-Z unstable-options --resource-suffix -20190923-1.39.0-nightly-66bf391c3 --static-root-path / --disable-per-crate-search --extern-html-root-url log=https://docs.rs/log/0.4.8 --extern-html-root-url memmap=https://docs.rs/memmap/0.7.0 --extern-html-root-url tempfile=https://docs.rs/tempfile/3.1.0 --extern-html-root-url no_std_compat=https://docs.rs/no-std-compat/0.1.1" "-e" "CARGO_HOME=/opt/rustwide/cargo-home" "-e" "RUSTUP_HOME=/opt/rustwide/rustup-home" "-w" "/opt/rustwide/workdir" "-m" "3221225472" "--network" "none" "rustops/crates-build-env" "/opt/rustwide/cargo-home/bin/cargo" "+nightly-2019-09-24" "doc" "--lib" "--no-deps" "--target" "x86_64-unknown-linux-gnu"`
[INFO] [stderr] WARNING: Your kernel does not support swap limit capabilities or the cgroup is not mounted. Memory limited without swap.
[INFO] [stdout] f1aa3762ac513e96127ed68f051c57299c9631401ebcadd995f113d5d5384776
[INFO] running `"docker" "start" "-a" "f1aa3762ac513e96127ed68f051c57299c9631401ebcadd995f113d5d5384776"`
[INFO] [stderr]    Compiling libc v0.2.62
[INFO] [stderr]    Compiling getrandom v0.1.12
[INFO] [stderr]     Checking cfg-if v0.1.10
[INFO] [stderr]     Checking lazy_static v1.4.0
[INFO] [stderr]     Checking ppv-lite86 v0.2.5
[INFO] [stderr]    Compiling log v0.4.8
[INFO] [stderr]     Checking remove_dir_all v0.5.2
[INFO] [stderr]     Checking no-std-compat v0.1.1
[INFO] [stderr]     Checking c2-chacha v0.2.2
[INFO] [stderr]     Checking memmap v0.7.0
[INFO] [stderr]     Checking rand_core v0.5.1
[INFO] [stderr]     Checking rand_chacha v0.2.1
[INFO] [stderr]     Checking rand v0.7.2
[INFO] [stderr]     Checking tempfile v3.1.0
[INFO] [stderr]  Documenting zkp-mmap-vec v0.1.0 (/opt/rustwide/workdir)
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/lib.rs:5:1
[INFO] [stderr]    |
[INFO] [stderr] 5  | / #![cfg_attr(not(feature = "std"), no_std)]
[INFO] [stderr] 6  | | // #![forbid(unsafe_code)] // We need unsafe in this package
[INFO] [stderr] 7  | | #![warn(
[INFO] [stderr] 8  | |     // Enable sets of warnings
[INFO] [stderr] ...  |
[INFO] [stderr] 51 | | #[cfg(not(feature = "std"))]
[INFO] [stderr] 52 | | pub use std::vec::Vec as MmapVec;
[INFO] [stderr]    | |_________________________________^
[INFO] [stderr]    |
[INFO] [stderr] note: lint level defined here
[INFO] [stderr]   --> src/lib.rs:29:5
[INFO] [stderr]    |
[INFO] [stderr] 29 |     missing_doc_code_examples,
[INFO] [stderr]    |     ^^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:19:1
[INFO] [stderr]    |
[INFO] [stderr] 19 | / pub struct MmapVec<T: Clone> {
[INFO] [stderr] 20 | |     mmap:     MmapMut,
[INFO] [stderr] 21 | |     length:   usize,
[INFO] [stderr] 22 | |     capacity: usize,
[INFO] [stderr] 23 | |     _t:       PhantomData<T>,
[INFO] [stderr] 24 | | }
[INFO] [stderr]    | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:20:5
[INFO] [stderr]    |
[INFO] [stderr] 20 |     mmap:     MmapMut,
[INFO] [stderr]    |     ^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:21:5
[INFO] [stderr]    |
[INFO] [stderr] 21 |     length:   usize,
[INFO] [stderr]    |     ^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:22:5
[INFO] [stderr]    |
[INFO] [stderr] 22 |     capacity: usize,
[INFO] [stderr]    |     ^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:23:5
[INFO] [stderr]    |
[INFO] [stderr] 23 |     _t:       PhantomData<T>,
[INFO] [stderr]    |     ^^^^^^^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:2:1
[INFO] [stderr]     |
[INFO] [stderr] 2   | / #![allow(unsafe_code)]
[INFO] [stderr] 3   | | use log::*;
[INFO] [stderr] 4   | | use memmap::{MmapMut, MmapOptions};
[INFO] [stderr] 5   | | use std::{
[INFO] [stderr] ...   |
[INFO] [stderr] 214 | |     }
[INFO] [stderr] 215 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:26:1
[INFO] [stderr]     |
[INFO] [stderr] 26  | / impl<T: Clone> MmapVec<T> {
[INFO] [stderr] 27  | |     pub fn with_capacity(capacity: usize) -> Self {
[INFO] [stderr] 28  | |         // From https://docs.rs/tempfile/3.1.0/tempfile/: tempfile() relies on
[INFO] [stderr] 29  | |         // the OS to remove the temporary file once the last handle is closed.
[INFO] [stderr] ...   |
[INFO] [stderr] 99  | |     }
[INFO] [stderr] 100 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:27:5
[INFO] [stderr]    |
[INFO] [stderr] 27 | /     pub fn with_capacity(capacity: usize) -> Self {
[INFO] [stderr] 28 | |         // From https://docs.rs/tempfile/3.1.0/tempfile/: tempfile() relies on
[INFO] [stderr] 29 | |         // the OS to remove the temporary file once the last handle is closed.
[INFO] [stderr] 30 | |         let file = tempfile().expect("cannot create temporary file");
[INFO] [stderr] ...  |
[INFO] [stderr] 44 | |         }
[INFO] [stderr] 45 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:49:5
[INFO] [stderr]    |
[INFO] [stderr] 49 | /     pub unsafe fn zero_initialized(len: usize) -> Self {
[INFO] [stderr] 50 | |         let mut result = Self::with_capacity(len);
[INFO] [stderr] 51 | |         result.length = len;
[INFO] [stderr] 52 | |         result
[INFO] [stderr] 53 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:55:5
[INFO] [stderr]    |
[INFO] [stderr] 55 | /     pub fn is_empty(&self) -> bool {
[INFO] [stderr] 56 | |         self.length == 0
[INFO] [stderr] 57 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:59:5
[INFO] [stderr]    |
[INFO] [stderr] 59 | /     pub fn len(&self) -> usize {
[INFO] [stderr] 60 | |         self.length
[INFO] [stderr] 61 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:63:5
[INFO] [stderr]    |
[INFO] [stderr] 63 | /     pub fn push(&mut self, next: T) {
[INFO] [stderr] 64 | |         if self.length == self.capacity {
[INFO] [stderr] 65 | |             panic!("MmapVec is at capacity")
[INFO] [stderr] 66 | |         }
[INFO] [stderr] ...  |
[INFO] [stderr] 69 | |         self[end] = next;
[INFO] [stderr] 70 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:72:5
[INFO] [stderr]    |
[INFO] [stderr] 72 | /     pub fn resize(&mut self, size: usize, fill: T) {
[INFO] [stderr] 73 | |         if size > self.capacity {
[INFO] [stderr] 74 | |             panic!("MmapVec is at capacity")
[INFO] [stderr] 75 | |         }
[INFO] [stderr] ...  |
[INFO] [stderr] 79 | |         self.length = size;
[INFO] [stderr] 80 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:82:5
[INFO] [stderr]    |
[INFO] [stderr] 82 | /     pub fn extend_from_slice(&mut self, slice: &[T]) {
[INFO] [stderr] 83 | |         if self.length + slice.len() > self.capacity {
[INFO] [stderr] 84 | |             panic!("MmapVec would grow beyond capacity")
[INFO] [stderr] 85 | |         }
[INFO] [stderr] ...  |
[INFO] [stderr] 88 | |         self.as_mut_slice()[start..].clone_from_slice(slice);
[INFO] [stderr] 89 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:92:5
[INFO] [stderr]    |
[INFO] [stderr] 92 | /     pub fn as_slice(&self) -> &[T] {
[INFO] [stderr] 93 | |         self
[INFO] [stderr] 94 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]   --> src/mmap_vec.rs:97:5
[INFO] [stderr]    |
[INFO] [stderr] 97 | /     pub fn as_mut_slice(&mut self) -> &mut [T] {
[INFO] [stderr] 98 | |         self
[INFO] [stderr] 99 | |     }
[INFO] [stderr]    | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:111:1
[INFO] [stderr]     |
[INFO] [stderr] 111 | / impl<T: Clone> Clone for MmapVec<T> {
[INFO] [stderr] 112 | |     fn clone(&self) -> Self {
[INFO] [stderr] 113 | |         let mut clone = Self::with_capacity(self.capacity);
[INFO] [stderr] 114 | |         clone.extend(self.iter());
[INFO] [stderr] 115 | |         clone
[INFO] [stderr] 116 | |     }
[INFO] [stderr] 117 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:112:5
[INFO] [stderr]     |
[INFO] [stderr] 112 | /     fn clone(&self) -> Self {
[INFO] [stderr] 113 | |         let mut clone = Self::with_capacity(self.capacity);
[INFO] [stderr] 114 | |         clone.extend(self.iter());
[INFO] [stderr] 115 | |         clone
[INFO] [stderr] 116 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:119:1
[INFO] [stderr]     |
[INFO] [stderr] 119 | / impl<T: Clone> Extend<T> for MmapVec<T> {
[INFO] [stderr] 120 | |     fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I) {
[INFO] [stderr] 121 | |         // The function signature is for compatibility with Vec::extend.
[INFO] [stderr] 122 | |         // OPT: Specialize for SliceIterator
[INFO] [stderr] ...   |
[INFO] [stderr] 126 | |     }
[INFO] [stderr] 127 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:120:5
[INFO] [stderr]     |
[INFO] [stderr] 120 | /     fn extend<I: IntoIterator<Item = T>>(&mut self, iter: I) {
[INFO] [stderr] 121 | |         // The function signature is for compatibility with Vec::extend.
[INFO] [stderr] 122 | |         // OPT: Specialize for SliceIterator
[INFO] [stderr] 123 | |         for i in iter {
[INFO] [stderr] 124 | |             self.push(i)
[INFO] [stderr] 125 | |         }
[INFO] [stderr] 126 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:129:1
[INFO] [stderr]     |
[INFO] [stderr] 129 | / impl<'a, T: 'a + Clone> Extend<&'a T> for MmapVec<T> {
[INFO] [stderr] 130 | |     fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) {
[INFO] [stderr] 131 | |         // The function signature is for compatibility with Vec::extend.
[INFO] [stderr] 132 | |         for i in iter {
[INFO] [stderr] ...   |
[INFO] [stderr] 135 | |     }
[INFO] [stderr] 136 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:130:5
[INFO] [stderr]     |
[INFO] [stderr] 130 | /     fn extend<I: IntoIterator<Item = &'a T>>(&mut self, iter: I) {
[INFO] [stderr] 131 | |         // The function signature is for compatibility with Vec::extend.
[INFO] [stderr] 132 | |         for i in iter {
[INFO] [stderr] 133 | |             self.push(i.clone())
[INFO] [stderr] 134 | |         }
[INFO] [stderr] 135 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:102:1
[INFO] [stderr]     |
[INFO] [stderr] 102 | / impl<T: Clone + PartialEq> PartialEq for MmapVec<T> {
[INFO] [stderr] 103 | |     fn eq(&self, other: &Self) -> bool {
[INFO] [stderr] 104 | |         if self.len() != other.len() {
[INFO] [stderr] 105 | |             return false;
[INFO] [stderr] ...   |
[INFO] [stderr] 108 | |     }
[INFO] [stderr] 109 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:103:5
[INFO] [stderr]     |
[INFO] [stderr] 103 | /     fn eq(&self, other: &Self) -> bool {
[INFO] [stderr] 104 | |         if self.len() != other.len() {
[INFO] [stderr] 105 | |             return false;
[INFO] [stderr] 106 | |         }
[INFO] [stderr] 107 | |         self.iter().zip(other.iter()).all(|(a, b)| a == b)
[INFO] [stderr] 108 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:147:1
[INFO] [stderr]     |
[INFO] [stderr] 147 | / impl<T: Clone> DerefMut for MmapVec<T> {
[INFO] [stderr] 148 | |     #[inline]
[INFO] [stderr] 149 | |     fn deref_mut(&mut self) -> &mut [T] {
[INFO] [stderr] 150 | |         unsafe { slice::from_raw_parts_mut(self.mmap.as_mut_ptr() as *mut T, self.length) }
[INFO] [stderr] 151 | |     }
[INFO] [stderr] 152 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:149:5
[INFO] [stderr]     |
[INFO] [stderr] 149 | /     fn deref_mut(&mut self) -> &mut [T] {
[INFO] [stderr] 150 | |         unsafe { slice::from_raw_parts_mut(self.mmap.as_mut_ptr() as *mut T, self.length) }
[INFO] [stderr] 151 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:138:1
[INFO] [stderr]     |
[INFO] [stderr] 138 | / impl<T: Clone> Deref for MmapVec<T> {
[INFO] [stderr] 139 | |     type Target = [T];
[INFO] [stderr] 140 | |
[INFO] [stderr] 141 | |     #[inline]
[INFO] [stderr] ...   |
[INFO] [stderr] 144 | |     }
[INFO] [stderr] 145 | | }
[INFO] [stderr]     | |_^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:139:5
[INFO] [stderr]     |
[INFO] [stderr] 139 |     type Target = [T];
[INFO] [stderr]     |     ^^^^^^^^^^^^^^^^^^
[INFO] [stderr] 
[INFO] [stderr] warning: Missing code example in this documentation
[INFO] [stderr]    --> src/mmap_vec.rs:142:5
[INFO] [stderr]     |
[INFO] [stderr] 142 | /     fn deref(&self) -> &[T] {
[INFO] [stderr] 143 | |         unsafe { slice::from_raw_parts(self.mmap.as_ptr() as *const T, self.length) }
[INFO] [stderr] 144 | |     }
[INFO] [stderr]     | |_____^
[INFO] [stderr] 
[INFO] [stderr]     Finished dev [unoptimized + debuginfo] target(s) in 6.12s
[INFO] running `"docker" "inspect" "f1aa3762ac513e96127ed68f051c57299c9631401ebcadd995f113d5d5384776"`
[INFO] running `"docker" "rm" "-f" "f1aa3762ac513e96127ed68f051c57299c9631401ebcadd995f113d5d5384776"`
[INFO] [stdout] f1aa3762ac513e96127ed68f051c57299c9631401ebcadd995f113d5d5384776