mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
Actix Web Rustls v0.21 support (#3116)
This commit is contained in:
@ -1,6 +1,6 @@
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use std::borrow::Cow;
|
||||
use std::{borrow::Cow, fmt::Write as _};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
|
||||
@ -8,9 +8,10 @@ fn compare_quoters(c: &mut Criterion) {
|
||||
let mut group = c.benchmark_group("Compare Quoters");
|
||||
|
||||
let quoter = actix_router::Quoter::new(b"", b"");
|
||||
let path_quoted = (0..=0x7f)
|
||||
.map(|c| format!("%{:02X}", c))
|
||||
.collect::<String>();
|
||||
let path_quoted = (0..=0x7f).fold(String::new(), |mut buf, c| {
|
||||
write!(&mut buf, "%{:02X}", c).unwrap();
|
||||
buf
|
||||
});
|
||||
let path_unquoted = ('\u{00}'..='\u{7f}').collect::<String>();
|
||||
|
||||
group.bench_function("quoter_unquoted", |b| {
|
||||
|
Reference in New Issue
Block a user