From a6d03b1e2f5b2616931ac68cd40a39bafe803794 Mon Sep 17 00:00:00 2001 From: Sergio Benitez Date: Sun, 2 Jul 2017 01:37:50 -0700 Subject: [PATCH] Small code improvements in guide. --- site/guide/requests.md | 4 ++-- site/guide/responses.md | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/site/guide/requests.md b/site/guide/requests.md index 4f8e8a0d..c6df5518 100644 --- a/site/guide/requests.md +++ b/site/guide/requests.md @@ -307,8 +307,8 @@ simple as possible via the ```rust #[post("/upload", format = "text/plain", data = "")] -fn upload(data: Data) -> io::Result> { - data.stream_to_file("/tmp/upload.txt").map(|n| Plain(n.to_string())) +fn upload(data: Data) -> io::Result { + data.stream_to_file("/tmp/upload.txt").map(|n| n.to_string()) } ``` diff --git a/site/guide/responses.md b/site/guide/responses.md index 86cc1024..39195b26 100644 --- a/site/guide/responses.md +++ b/site/guide/responses.md @@ -40,7 +40,7 @@ return a type of `status::Accepted`: ```rust #[get("/")] fn accept() -> status::Accepted { - status::Accepted(Some("I accept!".to_string())) + status::Accepted("I accept!".to_string()) } ```