mirror of https://github.com/fafhrd91/actix-web
feat: Add code formatting
This commit is contained in:
parent
4e56ae0594
commit
6f4bdb31f9
|
@ -6,8 +6,7 @@ use std::{
|
|||
|
||||
use serde::{de, Deserialize};
|
||||
|
||||
use crate::resource::ResourceMatchInfo;
|
||||
use crate::{de::PathDeserializer, Resource, ResourcePath};
|
||||
use crate::{de::PathDeserializer, resource::ResourceMatchInfo, Resource, ResourcePath};
|
||||
|
||||
#[derive(Debug, Clone)]
|
||||
pub enum PathItem {
|
||||
|
|
|
@ -1122,9 +1122,8 @@ pub(crate) fn insert_slash(path: &str) -> Cow<'_, str> {
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use crate::Path;
|
||||
|
||||
use super::*;
|
||||
use crate::Path;
|
||||
|
||||
#[test]
|
||||
fn equivalence() {
|
||||
|
|
|
@ -142,7 +142,9 @@ impl<T, U> RouterBuilder<T, U> {
|
|||
|
||||
/// Finish configuration and create router instance.
|
||||
pub fn finish(self) -> Router<T, U> {
|
||||
let max_path_conflicts = self.path_conflicts.iter()
|
||||
let max_path_conflicts = self
|
||||
.path_conflicts
|
||||
.iter()
|
||||
.map(|(_, path_conflicts)| *path_conflicts)
|
||||
.max()
|
||||
.unwrap_or(1);
|
||||
|
|
|
@ -1,11 +1,10 @@
|
|||
use std::{cell::RefCell, mem, rc::Rc};
|
||||
|
||||
use actix_service::{boxed, fn_service, Service, ServiceFactory};
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
use futures_util::future::join_all;
|
||||
|
||||
use actix_http::Request;
|
||||
use actix_router::{Path, ResourceDef, Router, Url};
|
||||
use actix_service::{boxed, fn_service, Service, ServiceFactory};
|
||||
use futures_core::future::LocalBoxFuture;
|
||||
use futures_util::future::join_all;
|
||||
|
||||
use crate::{
|
||||
body::BoxBody,
|
||||
|
|
|
@ -1,5 +1,7 @@
|
|||
use std::{cell::RefCell, fmt, future::Future, mem, rc::Rc};
|
||||
|
||||
use actix_http::{body::MessageBody, Extensions};
|
||||
use actix_router::{ResourceDef, Router};
|
||||
use actix_service::{
|
||||
apply, apply_fn_factory, boxed, IntoServiceFactory, Service, ServiceFactory, ServiceFactoryExt,
|
||||
Transform,
|
||||
|
@ -7,9 +9,6 @@ use actix_service::{
|
|||
use futures_core::future::LocalBoxFuture;
|
||||
use futures_util::future::join_all;
|
||||
|
||||
use actix_http::{body::MessageBody, Extensions};
|
||||
use actix_router::{ResourceDef, Router};
|
||||
|
||||
use crate::{
|
||||
config::ServiceConfig,
|
||||
data::Data,
|
||||
|
@ -553,6 +552,7 @@ mod tests {
|
|||
use actix_utils::future::ok;
|
||||
use bytes::Bytes;
|
||||
|
||||
use super::*;
|
||||
use crate::{
|
||||
guard,
|
||||
http::{
|
||||
|
@ -564,8 +564,6 @@ mod tests {
|
|||
web, App, HttpMessage, HttpRequest, HttpResponse,
|
||||
};
|
||||
|
||||
use super::*;
|
||||
|
||||
#[test]
|
||||
fn can_be_returned_from_fn() {
|
||||
fn my_scope_1() -> Scope {
|
||||
|
|
Loading…
Reference in New Issue