mirror of
https://github.com/fafhrd91/actix-web
synced 2025-06-26 06:57:43 +02:00
chore: remove allow(uninlined_format_args)
This commit is contained in:
@ -1,5 +1,3 @@
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
|
||||
use std::{borrow::Cow, fmt::Write as _};
|
||||
|
||||
use criterion::{black_box, criterion_group, criterion_main, Criterion};
|
||||
|
@ -2,7 +2,6 @@
|
||||
|
||||
#![deny(rust_2018_idioms, nonstandard_style)]
|
||||
#![warn(future_incompatible)]
|
||||
#![allow(clippy::uninlined_format_args)]
|
||||
#![doc(html_logo_url = "https://actix.rs/img/logo.png")]
|
||||
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
|
||||
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||
|
@ -97,6 +97,7 @@ impl<T, U> RouterBuilder<T, U> {
|
||||
ctx: U,
|
||||
) -> (&mut ResourceDef, &mut T, &mut U) {
|
||||
self.routes.push((rdef, val, ctx));
|
||||
#[allow(clippy::map_identity)] // map is used to distribute &mut-ness to tuple elements
|
||||
self.routes
|
||||
.last_mut()
|
||||
.map(|(rdef, val, ctx)| (rdef, val, ctx))
|
||||
@ -186,11 +187,11 @@ mod tests {
|
||||
assert_eq!(path.get("file").unwrap(), "file");
|
||||
assert_eq!(path.get("ext").unwrap(), "gz");
|
||||
|
||||
let mut path = Path::new("/vtest/ttt/index.html");
|
||||
let mut path = Path::new("/v2/ttt/index.html");
|
||||
let (h, info) = router.recognize_mut(&mut path).unwrap();
|
||||
assert_eq!(*h, 14);
|
||||
assert_eq!(info, ResourceId(4));
|
||||
assert_eq!(path.get("val").unwrap(), "test");
|
||||
assert_eq!(path.get("val").unwrap(), "2");
|
||||
assert_eq!(path.get("val2").unwrap(), "ttt");
|
||||
|
||||
let mut path = Path::new("/v/blah-blah/index.html");
|
||||
|
Reference in New Issue
Block a user