1
0
mirror of https://github.com/actix/actix-website synced 2025-06-27 15:39:02 +02:00

improve extractors docs

This commit is contained in:
Rob Ede
2022-04-07 16:22:17 +01:00
parent 0ddb72f6b0
commit 7d988fc27e
5 changed files with 29 additions and 22 deletions

View File

@ -1,8 +1,10 @@
// <arc>
use actix_web::{get, web, App, HttpServer, Responder};
use std::cell::Cell;
use std::sync::atomic::{AtomicUsize, Ordering};
use std::sync::Arc;
use std::{
cell::Cell,
sync::atomic::{AtomicUsize, Ordering},
sync::Arc,
};
#[derive(Clone)]
struct AppState {

View File

@ -1,6 +1,6 @@
pub mod handlers_arc;
// <data>
use actix_web::{web, Responder};
use actix_web::{web, App, HttpServer, Responder};
use std::cell::Cell;
#[derive(Clone)]
@ -21,8 +21,6 @@ async fn add_one(data: web::Data<AppState>) -> impl Responder {
#[actix_web::main]
async fn main() -> std::io::Result<()> {
use actix_web::{App, HttpServer};
let data = AppState {
count: Cell::new(0),
};