Skip to content

Commit

Permalink
fix: example mentions web::Data but refers to plain state struct (#11)
Browse files Browse the repository at this point in the history
Closes #10
  • Loading branch information
LeoniePhiline committed Jul 11, 2024
1 parent 4dafe92 commit 6c93ccb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion examples/application/src/mutable_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ async fn index(data: web::types::State<AppStateWithCounter>) -> String {
// <make_app_mutable>
#[ntex::main]
async fn main() -> std::io::Result<()> {
// Note: web::Data created _outside_ HttpServer::new closure
// Note: app state created _outside_ HttpServer::new closure
let counter = AppStateWithCounter {
counter: Mutex::new(0),
};
Expand Down

0 comments on commit 6c93ccb

Please sign in to comment.