diff --git a/axum/src/lib.rs b/axum/src/lib.rs index c4d2a684..03301667 100644 --- a/axum/src/lib.rs +++ b/axum/src/lib.rs @@ -134,13 +134,13 @@ //! it is simple to convert errors into responses and you are guaranteed that //! 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. //! //! # Middleware //! //! 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 //! @@ -190,7 +190,7 @@ //! //! ## 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: //! //! ```rust,no_run diff --git a/examples/error-handling/src/main.rs b/examples/error-handling/src/main.rs index 0ad9f43c..3cbcd47c 100644 --- a/examples/error-handling/src/main.rs +++ b/examples/error-handling/src/main.rs @@ -212,7 +212,7 @@ mod time_library { static COUNTER: AtomicU64 = AtomicU64::new(0); // 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) } else { Ok(Self(1337))