mirror of
https://github.com/tokio-rs/axum.git
synced 2024-11-23 23:57:38 +01:00
Update MSRV in READMEs (#2948)
This commit is contained in:
parent
928d31d1d7
commit
4944ed3b1c
5 changed files with 14 additions and 27 deletions
|
@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
|
|||
|
||||
## Minimum supported Rust version
|
||||
|
||||
axum-core's MSRV is 1.56.
|
||||
axum-core's MSRV is 1.75.
|
||||
|
||||
## Getting Help
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
|
|||
|
||||
## Minimum supported Rust version
|
||||
|
||||
axum-extra's MSRV is 1.66.
|
||||
axum-extra's MSRV is 1.75.
|
||||
|
||||
## Getting Help
|
||||
|
||||
|
|
|
@ -14,7 +14,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
|
|||
|
||||
## Minimum supported Rust version
|
||||
|
||||
axum-macros's MSRV is 1.66.
|
||||
axum-macros's MSRV is 1.75.
|
||||
|
||||
## Getting Help
|
||||
|
||||
|
|
|
@ -111,7 +111,7 @@ This crate uses `#![forbid(unsafe_code)]` to ensure everything is implemented in
|
|||
|
||||
## Minimum supported Rust version
|
||||
|
||||
axum's MSRV is 1.66.
|
||||
axum's MSRV is 1.75.
|
||||
|
||||
## Examples
|
||||
|
||||
|
|
|
@ -911,31 +911,18 @@ async fn state_isnt_cloned_too_much() {
|
|||
|
||||
impl Clone for AppState {
|
||||
fn clone(&self) -> Self {
|
||||
#[rustversion::since(1.66)]
|
||||
#[track_caller]
|
||||
fn count() {
|
||||
if SETUP_DONE.load(Ordering::SeqCst) {
|
||||
let bt = std::backtrace::Backtrace::force_capture();
|
||||
let bt = bt
|
||||
.to_string()
|
||||
.lines()
|
||||
.filter(|line| line.contains("axum") || line.contains("./src"))
|
||||
.collect::<Vec<_>>()
|
||||
.join("\n");
|
||||
println!("AppState::Clone:\n===============\n{bt}\n");
|
||||
COUNT.fetch_add(1, Ordering::SeqCst);
|
||||
}
|
||||
if SETUP_DONE.load(Ordering::SeqCst) {
|
||||
let bt = std::backtrace::Backtrace::force_capture();
|
||||
let bt = bt
|
||||
.to_string()
|
||||
.lines()
|
||||
.filter(|line| line.contains("axum") || line.contains("./src"))
|
||||
.collect::<Vec<_>>()
|
||||
.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
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue