mirror of
https://github.com/tokio-rs/axum.git
synced 2026-09-08 00:00:24 +02:00
Fix ci failures (#3432)
This commit is contained in:
+3
-3
@@ -134,13 +134,13 @@
|
|||||||
//! it is simple to convert errors into responses and you are guaranteed that
|
//! it is simple to convert errors into responses and you are guaranteed that
|
||||||
//! all errors are handled.
|
//! all errors are handled.
|
||||||
//!
|
//!
|
||||||
//! See [`error_handling`](crate::error_handling) for more details on axum's
|
//! See [`error_handling`] for more details on axum's
|
||||||
//! error handling model and how to handle errors gracefully.
|
//! error handling model and how to handle errors gracefully.
|
||||||
//!
|
//!
|
||||||
//! # Middleware
|
//! # Middleware
|
||||||
//!
|
//!
|
||||||
//! There are several different ways to write middleware for axum. See
|
//! There are several different ways to write middleware for axum. See
|
||||||
//! [`middleware`](crate::middleware) for more details.
|
//! [`middleware`] for more details.
|
||||||
//!
|
//!
|
||||||
//! # Sharing state with handlers
|
//! # Sharing state with handlers
|
||||||
//!
|
//!
|
||||||
@@ -190,7 +190,7 @@
|
|||||||
//!
|
//!
|
||||||
//! ## Using request extensions
|
//! ## Using request extensions
|
||||||
//!
|
//!
|
||||||
//! Another way to share state with handlers is using [`Extension`](crate::extract::Extension) as
|
//! Another way to share state with handlers is using [`Extension`] as
|
||||||
//! layer and extractor:
|
//! layer and extractor:
|
||||||
//!
|
//!
|
||||||
//! ```rust,no_run
|
//! ```rust,no_run
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ mod time_library {
|
|||||||
static COUNTER: AtomicU64 = AtomicU64::new(0);
|
static COUNTER: AtomicU64 = AtomicU64::new(0);
|
||||||
|
|
||||||
// Fail on every third call just to simulate errors
|
// Fail on every third call just to simulate errors
|
||||||
if COUNTER.fetch_add(1, Ordering::SeqCst) % 3 == 0 {
|
if COUNTER.fetch_add(1, Ordering::SeqCst).is_multiple_of(3) {
|
||||||
Err(Error::FailedToGetTime)
|
Err(Error::FailedToGetTime)
|
||||||
} else {
|
} else {
|
||||||
Ok(Self(1337))
|
Ok(Self(1337))
|
||||||
|
|||||||
Reference in New Issue
Block a user