mirror of
https://github.com/actix/actix-website
synced 2025-06-27 15:39:02 +02:00
Final fixes before requesting review.
This commit is contained in:
@ -1,5 +1,5 @@
|
||||
// <arc>
|
||||
use actix_web::{web, App, HttpServer, Responder};
|
||||
use actix_web::{web, Responder};
|
||||
use std::sync::atomic::{AtomicUsize, Ordering};
|
||||
use std::sync::Arc;
|
||||
|
||||
@ -19,6 +19,8 @@ fn add_one(data: web::Data<AppState>) -> impl Responder {
|
||||
}
|
||||
|
||||
pub fn main() {
|
||||
use actix_web::{App, HttpServer};
|
||||
|
||||
let data = AppState {
|
||||
count: Arc::new(AtomicUsize::new(0)),
|
||||
};
|
||||
|
@ -1,6 +1,6 @@
|
||||
pub mod handlers_arc;
|
||||
// <data>
|
||||
use actix_web::{web, App, HttpServer, Responder};
|
||||
use actix_web::{web, Responder};
|
||||
use std::cell::Cell;
|
||||
|
||||
#[derive(Clone)]
|
||||
@ -20,6 +20,8 @@ fn add_one(data: web::Data<AppState>) -> impl Responder {
|
||||
}
|
||||
|
||||
fn main() {
|
||||
use actix_web::{App, HttpServer};
|
||||
|
||||
let data = AppState {
|
||||
count: Cell::new(0),
|
||||
};
|
||||
|
Reference in New Issue
Block a user