From fd87eb59f8928c240579c54885ab63ea28843c28 Mon Sep 17 00:00:00 2001 From: Nikolay Kim Date: Tue, 10 Apr 2018 10:29:10 -0700 Subject: [PATCH] remove reference to master --- README.md | 14 +++----------- guide/src/qs_2.md | 2 +- src/server/shared.rs | 2 +- 3 files changed, 5 insertions(+), 13 deletions(-) diff --git a/README.md b/README.md index ae63f605b..e8f93a92b 100644 --- a/README.md +++ b/README.md @@ -20,7 +20,7 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust. [CSRF](https://actix.github.io/actix-web/actix_web/middleware/csrf/index.html)) * Built on top of [Actix actor framework](https://github.com/actix/actix) -## Documentation +## Documentation & community resources * [User Guide](http://actix.github.io/actix-web/guide/) * [API Documentation (Development)](http://actix.github.io/actix-web/actix_web/) @@ -31,26 +31,18 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust. ## Example -At the moment all examples are based on the actix-web `master` branch. - -```toml -[dependencies] -actix = "0.5" -actix-web = { git="https://github.com/actix/actix-web.git" } -``` - ```rust extern crate actix_web; use actix_web::{server, App, Path}; -fn index(info: Path<(String, u32)>) -> String { +fn index(info: Path<(u32, String)>) -> String { format!("Hello {}! id:{}", info.0, info.1) } fn main() { server::new( || App::new() - .resource("/{name}/{id}/index.html", |r| r.with(index))) + .resource("/{id}/{name}/index.html", |r| r.with(index))) .bind("127.0.0.1:8080").unwrap() .run(); } diff --git a/guide/src/qs_2.md b/guide/src/qs_2.md index 524c2c1de..8f3ec3923 100644 --- a/guide/src/qs_2.md +++ b/guide/src/qs_2.md @@ -17,7 +17,7 @@ contains the following: ```toml [dependencies] actix = "0.5" -actix-web = { git="https://github.com/actix/actix-web.git" } +actix-web = "0.5" ``` In order to implement a web server, we first need to create a request handler. diff --git a/src/server/shared.rs b/src/server/shared.rs index bb3269c05..6773abcda 100644 --- a/src/server/shared.rs +++ b/src/server/shared.rs @@ -39,7 +39,7 @@ pub(crate) struct SharedBytes( impl Drop for SharedBytes { fn drop(&mut self) { - if let Some(ref pool) = self.1 { + if let Some(pool) = self.1.take() { if let Some(bytes) = self.0.take() { if Rc::strong_count(&bytes) == 1 { pool.release_bytes(bytes);