Skip to content

Commit

Permalink
cleanup doc strings; prepare release
Browse files Browse the repository at this point in the history
  • Loading branch information
fafhrd91 committed Apr 16, 2018
1 parent 58cc0df commit 7981856
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 19 deletions.
2 changes: 1 addition & 1 deletion CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Changes


## 0.5.2 (2018-04-xx)
## 0.5.2 (2018-04-16)

* Allow to configure StaticFiles's CpuPool, via static method or env variable

Expand Down
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "actix-web"
version = "0.5.1"
version = "0.5.2"
authors = ["Nikolay Kim <[email protected]>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md"
Expand Down
12 changes: 0 additions & 12 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,5 @@ build:
test: build clippy
cargo test $(CARGO_FLAGS)

skeptic:
USE_SKEPTIC=1 cargo test $(CARGO_FLAGS)

# cd examples/word-count && python setup.py install && pytest -v tests

clippy:
if $$CLIPPY; then cargo clippy $(CARGO_FLAGS); fi

doc: build
cargo doc --no-deps $(CARGO_FLAGS)
cd guide; mdbook build -d ../target/doc/guide/; cd ..

book:
cd guide; mdbook build -d ../target/doc/guide/; cd ..
2 changes: 1 addition & 1 deletion src/client/writer.rs
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ impl HttpClientWriter {
self.buffer.take();
}

pub fn is_completed(&mut self) -> bool {
pub fn is_completed(&self) -> bool {
self.buffer.is_empty()
}

Expand Down
21 changes: 17 additions & 4 deletions src/extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -315,13 +315,18 @@ impl Default for FormConfig {
/// ```rust
/// extern crate bytes;
/// # extern crate actix_web;
/// use actix_web::{App, Result};
/// use actix_web::{http, App, Result};
///
/// /// extract text data from request
/// fn index(body: bytes::Bytes) -> Result<String> {
/// Ok(format!("Body {:?}!", body))
/// }
/// # fn main() {}
///
/// fn main() {
/// let app = App::new().resource(
/// "/index.html", |r|
/// r.method(http::Method::GET).with(index))
/// }
/// ```
impl<S: 'static> FromRequest<S> for Bytes {
type Config = PayloadConfig;
Expand Down Expand Up @@ -354,13 +359,21 @@ impl<S: 'static> FromRequest<S> for Bytes {
///
/// ```rust
/// # extern crate actix_web;
/// use actix_web::{App, Result};
/// use actix_web::{http, App, Result};
///
/// /// extract text data from request
/// fn index(body: String) -> Result<String> {
/// Ok(format!("Body {}!", body))
/// }
/// # fn main() {}
///
/// fn main() {
/// let app = App::new().resource(
/// "/index.html", |r| {
/// r.method(http::Method::GET)
/// .with(index) // <- register handler with extractor params
/// .limit(4096); // <- limit size of the payload
/// })
/// }
/// ```
impl<S: 'static> FromRequest<S> for String {
type Config = PayloadConfig;
Expand Down

0 comments on commit 7981856

Please sign in to comment.