From df3b8fa386703ca96d0d091d45066fd1c02b2796 Mon Sep 17 00:00:00 2001 From: Elad Kaplan Date: Thu, 11 Jan 2024 11:22:23 +0200 Subject: [PATCH] fix docs --- src/controller/middleware/auth.rs | 7 ++----- src/controller/routes.rs | 12 ++++++------ 2 files changed, 8 insertions(+), 11 deletions(-) diff --git a/src/controller/middleware/auth.rs b/src/controller/middleware/auth.rs index dac6fd49d..ea0520200 100644 --- a/src/controller/middleware/auth.rs +++ b/src/controller/middleware/auth.rs @@ -4,14 +4,11 @@ //! //! ``` //! use loco_rs::{ -//! controller::{middleware, format}, +//! controller::{middleware, format, Json}, //! app::AppContext, //! Result, //! }; -//! use axum::{ -//! Json, -//! extract::State -//! }; +//! use axum::extract::State; //! //! pub struct TestResponse { //! pub pid: String, diff --git a/src/controller/routes.rs b/src/controller/routes.rs index 541a44e36..306f77b99 100644 --- a/src/controller/routes.rs +++ b/src/controller/routes.rs @@ -31,10 +31,10 @@ impl Routes { /// /// ```rust /// use loco_rs::{ - /// controller::{Routes, format}, + /// controller::{Routes, format, Json}, /// Result, /// }; - /// use axum::{routing::get, Json}; + /// use axum::routing::get; /// use serde::Serialize;; /// /// #[derive(Serialize)] @@ -65,9 +65,9 @@ impl Routes { /// ```rust /// use loco_rs::{ /// Result, - /// controller::{Routes, format}, + /// controller::{Routes, format, Json}, /// }; - /// use axum::{routing::get, Json}; + /// use axum::routing::get; /// use serde::Serialize; /// /// #[derive(Serialize)] @@ -101,10 +101,10 @@ impl Routes { /// /// ```rust /// use loco_rs::{ - /// controller::{Routes, format}, + /// controller::{Routes, format, Json}, /// Result, /// }; - /// use axum::{routing::get, Json}; + /// use axum::routing::get; /// use serde::Serialize; /// /// #[derive(Serialize)]