From 5e5e5d8315791cda46a3d02a392f18c391e8179e Mon Sep 17 00:00:00 2001
From: Rob Ede <robjtede@icloud.com>
Date: Sat, 16 Dec 2023 10:26:32 +0000
Subject: [PATCH] chore: remove allow(uninlined_format_args)

---
 actix-files/src/lib.rs                          | 1 -
 actix-http-test/src/lib.rs                      | 1 -
 actix-http/benches/response-body-compression.rs | 2 --
 actix-http/src/lib.rs                           | 3 +--
 actix-http/tests/test_openssl.rs                | 1 -
 actix-http/tests/test_ws.rs                     | 2 --
 actix-multipart/src/lib.rs                      | 2 +-
 actix-router/benches/quoter.rs                  | 2 --
 actix-router/src/lib.rs                         | 1 -
 actix-router/src/router.rs                      | 5 +++--
 actix-web-actors/src/lib.rs                     | 1 -
 actix-web/benches/server.rs                     | 2 --
 actix-web/examples/macroless.rs                 | 2 --
 actix-web/examples/uds.rs                       | 2 --
 actix-web/src/lib.rs                            | 1 -
 actix-web/tests/test_httpserver.rs              | 2 --
 awc/examples/client.rs                          | 2 --
 awc/src/lib.rs                                  | 3 +--
 awc/tests/test_client.rs                        | 2 --
 19 files changed, 6 insertions(+), 31 deletions(-)

diff --git a/actix-files/src/lib.rs b/actix-files/src/lib.rs
index 7871905f..943130e1 100644
--- a/actix-files/src/lib.rs
+++ b/actix-files/src/lib.rs
@@ -13,7 +13,6 @@
 
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible, missing_docs, missing_debug_implementations)]
-#![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))]
diff --git a/actix-http-test/src/lib.rs b/actix-http-test/src/lib.rs
index 2f1725d1..554af910 100644
--- a/actix-http-test/src/lib.rs
+++ b/actix-http-test/src/lib.rs
@@ -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))]
diff --git a/actix-http/benches/response-body-compression.rs b/actix-http/benches/response-body-compression.rs
index d128bf75..53279e31 100644
--- a/actix-http/benches/response-body-compression.rs
+++ b/actix-http/benches/response-body-compression.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use std::convert::Infallible;
 
 use actix_http::{encoding::Encoder, ContentEncoding, Request, Response, StatusCode};
diff --git a/actix-http/src/lib.rs b/actix-http/src/lib.rs
index 976697ca..888c3e06 100644
--- a/actix-http/src/lib.rs
+++ b/actix-http/src/lib.rs
@@ -22,8 +22,7 @@
 #![allow(
     clippy::type_complexity,
     clippy::too_many_arguments,
-    clippy::borrow_interior_mutable_const,
-    clippy::uninlined_format_args
+    clippy::borrow_interior_mutable_const
 )]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
 #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
diff --git a/actix-http/tests/test_openssl.rs b/actix-http/tests/test_openssl.rs
index b4d8ed1a..cb16a4fe 100644
--- a/actix-http/tests/test_openssl.rs
+++ b/actix-http/tests/test_openssl.rs
@@ -1,5 +1,4 @@
 #![cfg(feature = "openssl")]
-#![allow(clippy::uninlined_format_args)]
 
 extern crate tls_openssl as openssl;
 
diff --git a/actix-http/tests/test_ws.rs b/actix-http/tests/test_ws.rs
index a2866613..9a78074c 100644
--- a/actix-http/tests/test_ws.rs
+++ b/actix-http/tests/test_ws.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use std::{
     cell::Cell,
     convert::Infallible,
diff --git a/actix-multipart/src/lib.rs b/actix-multipart/src/lib.rs
index 615a8e6d..495bae9c 100644
--- a/actix-multipart/src/lib.rs
+++ b/actix-multipart/src/lib.rs
@@ -2,7 +2,7 @@
 
 #![deny(rust_2018_idioms, nonstandard_style)]
 #![warn(future_incompatible)]
-#![allow(clippy::borrow_interior_mutable_const, clippy::uninlined_format_args)]
+#![allow(clippy::borrow_interior_mutable_const)]
 #![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))]
diff --git a/actix-router/benches/quoter.rs b/actix-router/benches/quoter.rs
index c7824080..2428a767 100644
--- a/actix-router/benches/quoter.rs
+++ b/actix-router/benches/quoter.rs
@@ -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};
diff --git a/actix-router/src/lib.rs b/actix-router/src/lib.rs
index 53c0ad82..f1009343 100644
--- a/actix-router/src/lib.rs
+++ b/actix-router/src/lib.rs
@@ -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))]
diff --git a/actix-router/src/router.rs b/actix-router/src/router.rs
index d31d10ce..1dd4449d 100644
--- a/actix-router/src/router.rs
+++ b/actix-router/src/router.rs
@@ -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");
diff --git a/actix-web-actors/src/lib.rs b/actix-web-actors/src/lib.rs
index cf2eb364..d89b0ee3 100644
--- a/actix-web-actors/src/lib.rs
+++ b/actix-web-actors/src/lib.rs
@@ -57,7 +57,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))]
diff --git a/actix-web/benches/server.rs b/actix-web/benches/server.rs
index 2c9f71dc..0d45c940 100644
--- a/actix-web/benches/server.rs
+++ b/actix-web/benches/server.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use actix_web::{web, App, HttpResponse};
 use awc::Client;
 use criterion::{criterion_group, criterion_main, Criterion};
diff --git a/actix-web/examples/macroless.rs b/actix-web/examples/macroless.rs
index d3589da2..78ffd45c 100644
--- a/actix-web/examples/macroless.rs
+++ b/actix-web/examples/macroless.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use actix_web::{middleware, rt, web, App, HttpRequest, HttpServer};
 
 async fn index(req: HttpRequest) -> &'static str {
diff --git a/actix-web/examples/uds.rs b/actix-web/examples/uds.rs
index 15e28ba1..e854bb3b 100644
--- a/actix-web/examples/uds.rs
+++ b/actix-web/examples/uds.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use actix_web::{get, web, HttpRequest};
 #[cfg(unix)]
 use actix_web::{middleware, App, Error, HttpResponse, HttpServer};
diff --git a/actix-web/src/lib.rs b/actix-web/src/lib.rs
index e982a43b..88f0ae9b 100644
--- a/actix-web/src/lib.rs
+++ b/actix-web/src/lib.rs
@@ -69,7 +69,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))]
diff --git a/actix-web/tests/test_httpserver.rs b/actix-web/tests/test_httpserver.rs
index 861d76d9..86e0575f 100644
--- a/actix-web/tests/test_httpserver.rs
+++ b/actix-web/tests/test_httpserver.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 #[cfg(feature = "openssl")]
 extern crate tls_openssl as openssl;
 
diff --git a/awc/examples/client.rs b/awc/examples/client.rs
index 26edcfd6..16ad330b 100644
--- a/awc/examples/client.rs
+++ b/awc/examples/client.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use std::error::Error as StdError;
 
 #[tokio::main]
diff --git a/awc/src/lib.rs b/awc/src/lib.rs
index ce2dfb34..253b5161 100644
--- a/awc/src/lib.rs
+++ b/awc/src/lib.rs
@@ -105,8 +105,7 @@
 #![allow(
     clippy::type_complexity,
     clippy::borrow_interior_mutable_const,
-    clippy::needless_doctest_main,
-    clippy::uninlined_format_args
+    clippy::needless_doctest_main
 )]
 #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
 #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
diff --git a/awc/tests/test_client.rs b/awc/tests/test_client.rs
index 6d1459ac..76915630 100644
--- a/awc/tests/test_client.rs
+++ b/awc/tests/test_client.rs
@@ -1,5 +1,3 @@
-#![allow(clippy::uninlined_format_args)]
-
 use std::{
     collections::HashMap,
     convert::Infallible,