From 8f89a9c670f5f9dad08c57fdb525e69cd3c70fe3 Mon Sep 17 00:00:00 2001 From: Nigel Greenway Date: Fri, 1 Mar 2019 21:27:19 +0000 Subject: [PATCH] Make variable more readable Due to a late night working on this whilst learning rust and so on, I read the `l` as a `1`. This extends the variable for enhanced readability. --- content/docs/autoreload.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/content/docs/autoreload.md b/content/docs/autoreload.md index 47e2cd6..ff4af9e 100644 --- a/content/docs/autoreload.md +++ b/content/docs/autoreload.md @@ -58,8 +58,8 @@ fn main() { .resource("/", |r| r.f(index)) }); - server = if let Some(l) = listenfd.take_tcp_listener(0).unwrap() { - server.listen(l) + server = if let Some(listener) = listenfd.take_tcp_listener(0).unwrap() { + server.listen(listener) } else { server.bind("127.0.0.1:3000").unwrap() };