From 4944ed3b1c5abaf85341248ab0ddea3be537327e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?David=20Ml=C3=A1dek?= Date: Mon, 30 Sep 2024 10:18:49 +0200 Subject: [PATCH] Update MSRV in READMEs (#2948) --- axum-core/README.md | 2 +- axum-extra/README.md | 2 +- axum-macros/README.md | 2 +- axum/README.md | 2 +- axum/src/routing/tests/mod.rs | 33 ++++++++++----------------------- 5 files changed, 14 insertions(+), 27 deletions(-) diff --git a/axum-core/README.md b/axum-core/README.md index 01ff4e51..600ec337 100644 --- a/axum-core/README.md +++ b/axum-core/README.md @@ -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 diff --git a/axum-extra/README.md b/axum-extra/README.md index 16b96cc8..7d3e904e 100644 --- a/axum-extra/README.md +++ b/axum-extra/README.md @@ -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 diff --git a/axum-macros/README.md b/axum-macros/README.md index 8fcde01e..c3967b19 100644 --- a/axum-macros/README.md +++ b/axum-macros/README.md @@ -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 diff --git a/axum/README.md b/axum/README.md index ac4b64c5..344484a8 100644 --- a/axum/README.md +++ b/axum/README.md @@ -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 diff --git a/axum/src/routing/tests/mod.rs b/axum/src/routing/tests/mod.rs index 20e27493..978125d0 100644 --- a/axum/src/routing/tests/mod.rs +++ b/axum/src/routing/tests/mod.rs @@ -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::>() - .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::>() + .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 } }