diff --git a/common/src/timer.rs b/common/src/timer.rs index 0bcebb6..118dc15 100644 --- a/common/src/timer.rs +++ b/common/src/timer.rs @@ -28,7 +28,7 @@ use wasm_timer::Instant; /// ``` /// use common::timer; /// let mut t = timer::Timer::new("my method"); -/// let values = vec![1,2,3]; +/// let values = vec![1, 2, 3]; /// // would send to log info a message like: /// // [my method | read input size: 3] elapsed 0.231 sec [qps: 2314] /// t.qps("read input", values.len()); @@ -126,11 +126,11 @@ impl Timer { /// /// ``` /// use common::timer; - /// { // execution block to meter RAII + /// { + /// // execution block to meter RAII /// let mut timer = timer::Timer::new("my method"); /// timer.set_extra_label("perf"); /// timer.set_size(100); - /// /// } // on exiting the execution block the timer will fire /// ``` pub fn new(label: &str) -> Timer { diff --git a/crypto/src/eccipher.rs b/crypto/src/eccipher.rs index ff71b44..3fc61ec 100644 --- a/crypto/src/eccipher.rs +++ b/crypto/src/eccipher.rs @@ -163,14 +163,17 @@ impl Default for ECRistrettoSequential { /// /// ``` /// extern crate curve25519_dalek; -/// use rand_core::OsRng; -/// use curve25519_dalek::scalar::Scalar; /// use crypto::eccipher; +/// use curve25519_dalek::scalar::Scalar; +/// use rand_core::OsRng; /// let mut rng = OsRng; /// let (key, power) = (Scalar::random(&mut rng), Scalar::random(&mut rng)); /// let eccipher = eccipher::ECRistrettoParallel::default(); /// -/// let text = vec!["a", "b", "c"].iter().map(|x| String::from(*x)).collect::>(); +/// let text = vec!["a", "b", "c"] +/// .iter() +/// .map(|x| String::from(*x)) +/// .collect::>(); /// ``` pub struct ECRistrettoParallel {}