1
0
mirror of https://github.com/fafhrd91/actix-web synced 2024-11-23 16:21:06 +01:00

chore: remove allow(uninlined_format_args)

This commit is contained in:
Rob Ede 2023-12-16 10:26:32 +00:00
parent c7a0af31d3
commit 5e5e5d8315
No known key found for this signature in database
GPG Key ID: 97C636207D3EF933
19 changed files with 6 additions and 31 deletions

View File

@ -13,7 +13,6 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible, missing_docs, missing_debug_implementations)] #![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_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -2,7 +2,6 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)] #![warn(future_incompatible)]
#![allow(clippy::uninlined_format_args)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use std::convert::Infallible; use std::convert::Infallible;
use actix_http::{encoding::Encoder, ContentEncoding, Request, Response, StatusCode}; use actix_http::{encoding::Encoder, ContentEncoding, Request, Response, StatusCode};

View File

@ -22,8 +22,7 @@
#![allow( #![allow(
clippy::type_complexity, clippy::type_complexity,
clippy::too_many_arguments, clippy::too_many_arguments,
clippy::borrow_interior_mutable_const, clippy::borrow_interior_mutable_const
clippy::uninlined_format_args
)] )]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

View File

@ -1,5 +1,4 @@
#![cfg(feature = "openssl")] #![cfg(feature = "openssl")]
#![allow(clippy::uninlined_format_args)]
extern crate tls_openssl as openssl; extern crate tls_openssl as openssl;

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use std::{ use std::{
cell::Cell, cell::Cell,
convert::Infallible, convert::Infallible,

View File

@ -2,7 +2,7 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)] #![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_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use std::{borrow::Cow, fmt::Write as _}; use std::{borrow::Cow, fmt::Write as _};
use criterion::{black_box, criterion_group, criterion_main, Criterion}; use criterion::{black_box, criterion_group, criterion_main, Criterion};

View File

@ -2,7 +2,6 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)] #![warn(future_incompatible)]
#![allow(clippy::uninlined_format_args)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -97,6 +97,7 @@ impl<T, U> RouterBuilder<T, U> {
ctx: U, ctx: U,
) -> (&mut ResourceDef, &mut T, &mut U) { ) -> (&mut ResourceDef, &mut T, &mut U) {
self.routes.push((rdef, val, ctx)); self.routes.push((rdef, val, ctx));
#[allow(clippy::map_identity)] // map is used to distribute &mut-ness to tuple elements
self.routes self.routes
.last_mut() .last_mut()
.map(|(rdef, val, ctx)| (rdef, val, ctx)) .map(|(rdef, val, ctx)| (rdef, val, ctx))
@ -186,11 +187,11 @@ mod tests {
assert_eq!(path.get("file").unwrap(), "file"); assert_eq!(path.get("file").unwrap(), "file");
assert_eq!(path.get("ext").unwrap(), "gz"); 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(); let (h, info) = router.recognize_mut(&mut path).unwrap();
assert_eq!(*h, 14); assert_eq!(*h, 14);
assert_eq!(info, ResourceId(4)); 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"); assert_eq!(path.get("val2").unwrap(), "ttt");
let mut path = Path::new("/v/blah-blah/index.html"); let mut path = Path::new("/v/blah-blah/index.html");

View File

@ -57,7 +57,6 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)] #![warn(future_incompatible)]
#![allow(clippy::uninlined_format_args)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use actix_web::{web, App, HttpResponse}; use actix_web::{web, App, HttpResponse};
use awc::Client; use awc::Client;
use criterion::{criterion_group, criterion_main, Criterion}; use criterion::{criterion_group, criterion_main, Criterion};

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use actix_web::{middleware, rt, web, App, HttpRequest, HttpServer}; use actix_web::{middleware, rt, web, App, HttpRequest, HttpServer};
async fn index(req: HttpRequest) -> &'static str { async fn index(req: HttpRequest) -> &'static str {

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use actix_web::{get, web, HttpRequest}; use actix_web::{get, web, HttpRequest};
#[cfg(unix)] #[cfg(unix)]
use actix_web::{middleware, App, Error, HttpResponse, HttpServer}; use actix_web::{middleware, App, Error, HttpResponse, HttpServer};

View File

@ -69,7 +69,6 @@
#![deny(rust_2018_idioms, nonstandard_style)] #![deny(rust_2018_idioms, nonstandard_style)]
#![warn(future_incompatible)] #![warn(future_incompatible)]
#![allow(clippy::uninlined_format_args)]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]
#![cfg_attr(docsrs, feature(doc_auto_cfg))] #![cfg_attr(docsrs, feature(doc_auto_cfg))]

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
#[cfg(feature = "openssl")] #[cfg(feature = "openssl")]
extern crate tls_openssl as openssl; extern crate tls_openssl as openssl;

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use std::error::Error as StdError; use std::error::Error as StdError;
#[tokio::main] #[tokio::main]

View File

@ -105,8 +105,7 @@
#![allow( #![allow(
clippy::type_complexity, clippy::type_complexity,
clippy::borrow_interior_mutable_const, clippy::borrow_interior_mutable_const,
clippy::needless_doctest_main, clippy::needless_doctest_main
clippy::uninlined_format_args
)] )]
#![doc(html_logo_url = "https://actix.rs/img/logo.png")] #![doc(html_logo_url = "https://actix.rs/img/logo.png")]
#![doc(html_favicon_url = "https://actix.rs/favicon.ico")] #![doc(html_favicon_url = "https://actix.rs/favicon.ico")]

View File

@ -1,5 +1,3 @@
#![allow(clippy::uninlined_format_args)]
use std::{ use std::{
collections::HashMap, collections::HashMap,
convert::Infallible, convert::Infallible,