Update MSRV in READMEs (#2948)

This commit is contained in:
David Mládek 2024-09-30 10:18:49 +02:00 committed by GitHub
parent 928d31d1d7
commit 4944ed3b1c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
5 changed files with 14 additions and 27 deletions

View File

@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
## Minimum supported Rust version ## Minimum supported Rust version
axum-core's MSRV is 1.56. axum-core's MSRV is 1.75.
## Getting Help ## Getting Help

View File

@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
## Minimum supported Rust version ## Minimum supported Rust version
axum-extra's MSRV is 1.66. axum-extra's MSRV is 1.75.
## Getting Help ## Getting Help

View File

@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
## Minimum supported Rust version ## Minimum supported Rust version
axum-macros's MSRV is 1.66. axum-macros's MSRV is 1.75.
## Getting Help ## Getting Help

View File

@ -111,7 +111,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
## Minimum supported Rust version ## Minimum supported Rust version
axum's MSRV is 1.66. axum's MSRV is 1.75.
## Examples ## Examples

View File

@ -911,31 +911,18 @@ async fn state_isnt_cloned_too_much() {
impl Clone for AppState { impl Clone for AppState {
fn clone(&self) -> Self { fn clone(&self) -> Self {
#[rustversion::since(1.66)] if SETUP_DONE.load(Ordering::SeqCst) {
#[track_caller] let bt = std::backtrace::Backtrace::force_capture();
fn count() { let bt = bt
if SETUP_DONE.load(Ordering::SeqCst) { .to_string()
let bt = std::backtrace::Backtrace::force_capture(); .lines()
let bt = bt .filter(|line| line.contains("axum") || line.contains("./src"))
.to_string() .collect::<Vec<_>>()
.lines() .join("\n");
.filter(|line| line.contains("axum") || line.contains("./src")) println!("AppState::Clone:\n===============\n{bt}\n");
.collect::<Vec<_>>() COUNT.fetch_add(1, Ordering::SeqCst);
.join("\n");
println!("AppState::Clone:\n===============\n{bt}\n");
COUNT.fetch_add(1, Ordering::SeqCst);
}
} }
#[rustversion::not(since(1.66))]
fn count() {
if SETUP_DONE.load(Ordering::SeqCst) {
COUNT.fetch_add(1, Ordering::SeqCst);
}
}
count();
Self Self
} }
} }