forked from actix/actix-web
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Port over doc comments in route macros. (actix#2022)
Co-authored-by: Jonas Platte <[email protected]> Co-authored-by: Rob Ede <[email protected]>
- Loading branch information
1 parent
f639372
commit 42711c2
Showing
4 changed files
with
40 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
use actix_web::{Responder, HttpResponse, App, test}; | ||
use actix_web_codegen::*; | ||
|
||
/// Docstrings shouldn't break anything. | ||
#[get("/")] | ||
async fn index() -> impl Responder { | ||
HttpResponse::Ok() | ||
} | ||
|
||
#[actix_web::main] | ||
async fn main() { | ||
let srv = test::start(|| App::new().service(index)); | ||
|
||
let request = srv.get("/"); | ||
let response = request.send().await.unwrap(); | ||
assert!(response.status().is_success()); | ||
} |