1
0
Fork 0
mirror of https://github.com/actix/actix-web.git synced 2024-05-20 01:08:10 +00:00

cleanup doc strings; prepare release

This commit is contained in:
Nikolay Kim 2018-04-16 09:30:59 -07:00
parent 58cc0dfbc5
commit 79818560b2
5 changed files with 20 additions and 19 deletions

View file

@ -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

View file

@ -1,6 +1,6 @@
[package]
name = "actix-web"
version = "0.5.1"
version = "0.5.2"
authors = ["Nikolay Kim <fafhrd91@gmail.com>"]
description = "Actix web is a simple, pragmatic and extremely fast web framework for Rust."
readme = "README.md"

View file

@ -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 ..

View file

@ -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()
}

View file

@ -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;
@ -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;