mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
fix some tests
This commit is contained in:
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/a", get(|_: AppState| async {}))
|
||||
.route("/b", get(|_: InnerState| async {}))
|
||||
.with_state(AppState::default());
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequestParts;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/a", get(|_: AppState| async {}))
|
||||
.route("/b", get(|_: InnerState| async {}))
|
||||
.route("/c", get(|_: AppState, _: InnerState| async {}))
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
};
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/b", get(|_: Extractor| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
@@ -7,7 +7,7 @@ use axum::{
|
||||
use std::collections::HashMap;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/b", get(|_: Extractor| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/", get(|_: Extractor| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/", get(|_: Extractor| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/b", get(|_: (), _: AppState| async {}))
|
||||
.route("/c", get(|_: (), _: InnerState| async {}))
|
||||
.with_state(AppState::default());
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/b", get(|_: AppState| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
@@ -6,7 +6,7 @@ use axum::{
|
||||
use axum_macros::FromRequestParts;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/a", get(|_: AppState, _: InnerState, _: String| async {}))
|
||||
.route("/b", get(|_: AppState, _: String| async {}))
|
||||
.route("/c", get(|_: InnerState, _: String| async {}))
|
||||
|
||||
@@ -8,7 +8,7 @@ use axum::{
|
||||
use axum_macros::FromRequest;
|
||||
|
||||
fn main() {
|
||||
let _: axum::routing::RouterService = Router::new()
|
||||
let _: axum::Router = Router::new()
|
||||
.route("/a", get(|_: Extractor| async {}))
|
||||
.with_state(AppState::default());
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user