mirror of https://github.com/fafhrd91/actix-web
Merge branch 'master' into master
This commit is contained in:
commit
4afe09b1dc
12
README.md
12
README.md
|
@ -41,6 +41,16 @@ Actix web is a simple, pragmatic and extremely fast web framework for Rust.
|
||||||
|
|
||||||
## Example
|
## Example
|
||||||
|
|
||||||
|
Dependencies:
|
||||||
|
|
||||||
|
```toml
|
||||||
|
[dependencies]
|
||||||
|
actix-web = "2"
|
||||||
|
actix-rt = "1"
|
||||||
|
```
|
||||||
|
|
||||||
|
Code:
|
||||||
|
|
||||||
```rust
|
```rust
|
||||||
use actix_web::{get, web, App, HttpServer, Responder};
|
use actix_web::{get, web, App, HttpServer, Responder};
|
||||||
|
|
||||||
|
@ -65,7 +75,7 @@ async fn main() -> std::io::Result<()> {
|
||||||
* [Multipart streams](https://github.com/actix/examples/tree/master/multipart/)
|
* [Multipart streams](https://github.com/actix/examples/tree/master/multipart/)
|
||||||
* [Simple websocket](https://github.com/actix/examples/tree/master/websocket/)
|
* [Simple websocket](https://github.com/actix/examples/tree/master/websocket/)
|
||||||
* [Tera](https://github.com/actix/examples/tree/master/template_tera/) /
|
* [Tera](https://github.com/actix/examples/tree/master/template_tera/) /
|
||||||
[Askama](https://github.com/actix/examples/tree/master/template_askama/) templates
|
* [Askama](https://github.com/actix/examples/tree/master/template_askama/) templates
|
||||||
* [Diesel integration](https://github.com/actix/examples/tree/master/diesel/)
|
* [Diesel integration](https://github.com/actix/examples/tree/master/diesel/)
|
||||||
* [r2d2](https://github.com/actix/examples/tree/master/r2d2/)
|
* [r2d2](https://github.com/actix/examples/tree/master/r2d2/)
|
||||||
* [OpenSSL](https://github.com/actix/examples/tree/master/openssl/)
|
* [OpenSSL](https://github.com/actix/examples/tree/master/openssl/)
|
||||||
|
|
|
@ -275,7 +275,7 @@ impl Files {
|
||||||
///
|
///
|
||||||
/// `File` uses `ThreadPool` for blocking filesystem operations.
|
/// `File` uses `ThreadPool` for blocking filesystem operations.
|
||||||
/// By default pool with 5x threads of available cpus is used.
|
/// By default pool with 5x threads of available cpus is used.
|
||||||
/// Pool size can be changed by setting ACTIX_CPU_POOL environment variable.
|
/// Pool size can be changed by setting ACTIX_THREADPOOL environment variable.
|
||||||
pub fn new<T: Into<PathBuf>>(path: &str, dir: T) -> Files {
|
pub fn new<T: Into<PathBuf>>(path: &str, dir: T) -> Files {
|
||||||
let orig_dir = dir.into();
|
let orig_dir = dir.into();
|
||||||
let dir = match orig_dir.canonicalize() {
|
let dir = match orig_dir.canonicalize() {
|
||||||
|
|
Loading…
Reference in New Issue