mirror of
https://github.com/fafhrd91/actix-web
synced 2025-07-01 16:55:08 +02:00
don't use rust annotation on code doc blocks
This commit is contained in:
@ -16,7 +16,7 @@ use crate::{error::Error, service::ServiceResponse};
|
||||
/// [`Scope::wrap`](crate::Scope::wrap) and [`Condition`](super::Condition).
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::middleware::{Logger, Compat};
|
||||
/// use actix_web::{App, web};
|
||||
///
|
||||
|
@ -31,7 +31,7 @@ use crate::{
|
||||
/// encoding to `ContentEncoding::Identity`.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::{web, middleware, App, HttpResponse};
|
||||
///
|
||||
/// let app = App::new()
|
||||
|
@ -12,7 +12,7 @@ use futures_util::future::{Either, FutureExt, LocalBoxFuture};
|
||||
/// middleware for a workaround.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::middleware::{Condition, NormalizePath};
|
||||
/// use actix_web::App;
|
||||
///
|
||||
|
@ -29,7 +29,7 @@ use crate::{
|
||||
/// Headers with the same key that are already set in a response will *not* be overwritten.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::{web, http, middleware, App, HttpResponse};
|
||||
///
|
||||
/// fn main() {
|
||||
|
@ -34,7 +34,7 @@ type ErrorHandler<B> = dyn Fn(ServiceResponse<B>) -> Result<ErrorHandlerResponse
|
||||
/// for a given status code. Handlers can modify existing responses or create completely new ones.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::middleware::{ErrorHandlers, ErrorHandlerResponse};
|
||||
/// use actix_web::{web, http, dev, App, HttpRequest, HttpResponse, Result};
|
||||
///
|
||||
|
@ -43,7 +43,7 @@ use crate::{
|
||||
/// ```
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::{middleware::Logger, App};
|
||||
///
|
||||
/// // access logs are printed with the INFO level so ensure it is enabled by default
|
||||
@ -124,7 +124,7 @@ impl Logger {
|
||||
/// It is convention to print "-" to indicate no output instead of an empty string.
|
||||
///
|
||||
/// # Example
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// # use actix_web::{http::HeaderValue, middleware::Logger};
|
||||
/// # fn parse_jwt_id (_req: Option<&HeaderValue>) -> String { "jwt_uid".to_owned() }
|
||||
/// Logger::new("example %{JWT_ID}xi")
|
||||
|
@ -54,7 +54,7 @@ impl Default for TrailingSlash {
|
||||
/// `TrailingSlash::Always` behavior), as shown in the example tests below.
|
||||
///
|
||||
/// # Examples
|
||||
/// ```rust
|
||||
/// ```
|
||||
/// use actix_web::{web, middleware, App};
|
||||
///
|
||||
/// # actix_web::rt::System::new().block_on(async {
|
||||
|
Reference in New Issue
Block a user