Skip to content

Instantly share code, notes, and snippets.

@lukas-code
lukas-code / benchmark.rs
Last active November 24, 2023 19:44
VecDeque::drain destructor benchmark
// criterion = "0.5"
use std::collections::VecDeque;
use std::iter;
use std::rc::Rc;
use criterion::{Criterion, black_box};
fn bench_method1(c: &mut Criterion) {
let v = VecDeque::from_iter(0..512);
c.bench_function("single", |b| {
@lukas-code
lukas-code / backticks.txt
Last active April 27, 2023 13:57
rustdoc::unescaped_backticks example output
warning: unescaped backtick
--> /bytes-1.4.0/src/buf/buf_impl.rs:147:12
|
147 | /// in `self.
| ^
|
= note: `#[warn(rustdoc::unescaped_backticks)]` on by default
help: the closing backtick of an inline code may be missing
|
147 | /// in `self`.