mirror of
https://github.com/tokio-rs/axum.git
synced 2025-10-02 07:20:38 +00:00
Use separate lexical scope for lock guard in docs (#2439)
This commit is contained in:
parent
212d959a54
commit
3fda093806
@ -321,8 +321,10 @@ use std::{
|
|||||||
/// }
|
/// }
|
||||||
///
|
///
|
||||||
/// async fn handler(State(state): State<AppState>) {
|
/// async fn handler(State(state): State<AppState>) {
|
||||||
/// let mut data = state.data.lock().expect("mutex was poisoned");
|
/// {
|
||||||
/// *data = "updated foo".to_owned();
|
/// let mut data = state.data.lock().expect("mutex was poisoned");
|
||||||
|
/// *data = "updated foo".to_owned();
|
||||||
|
/// }
|
||||||
///
|
///
|
||||||
/// // ...
|
/// // ...
|
||||||
/// }
|
/// }
|
||||||
|
Loading…
x
Reference in New Issue
Block a user