From e318f20a0c24e6aec12797fa9ef6b69dd16007e8 Mon Sep 17 00:00:00 2001 From: Lyle Mantooth Date: Wed, 23 May 2018 11:19:48 -0400 Subject: [PATCH] Make Getting Started example compile Unlike other code I've seen in the guide, this code didn't compile. It's especially bad that it can be the first experience someone has with actix-web, and then doesn't work. I'm going to run through the docs as a first-time user so I'll try to make sure everything works the way it's supposed to. --- content/docs/getting-started.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/getting-started.md b/content/docs/getting-started.md index 1802535..c7b2770 100644 --- a/content/docs/getting-started.md +++ b/content/docs/getting-started.md @@ -34,9 +34,9 @@ Filename: `src/main.rs` ```rust extern crate actix_web; -use actix_web::{HttpRequest, Responder, App, server}; +use actix_web::{HttpRequest, App, server}; -fn index(req: _HttpRequest) -> Responder { +fn index(_req: HttpRequest) -> &'static str { "Hello world!" } ```