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

moves individual examples to pub mods to force building and have less dead_code

This commit is contained in:
Cameron Dershem
2019-06-19 00:20:50 -04:00
parent a3cb721ed3
commit 4f9bd8b724
49 changed files with 226 additions and 191 deletions

View File

@ -2,14 +2,14 @@ use actix_web::{web, App, FromRequest, HttpRequest, HttpServer, Responder};
use futures::future::Future;
use serde::Deserialize;
// mod custom_handler;
mod form;
mod json_one;
mod json_two;
mod multiple;
mod path_one;
mod path_two;
mod query;
// pub mod custom_handler;
pub mod form;
pub mod json_one;
pub mod json_two;
pub mod multiple;
pub mod path_one;
pub mod path_two;
pub mod query;
#[derive(Deserialize, Debug)]
struct MyInfo {

View File

@ -10,7 +10,7 @@ struct Info {
/// extract path info using serde
fn index(info: web::Path<Info>) -> Result<String> {
Ok(format!("Welcome {}!", info.friend))
Ok(format!("Welcome {}, userid {}!", info.friend, info.userid))
}
pub fn main() {