1
0
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:
Cameron Dershem
2019-06-28 13:31:30 -04:00
parent cbf046b1f0
commit 5133ab874d
40 changed files with 116 additions and 81 deletions

View File

@ -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)),
};

View File

@ -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),
};