mirror of
https://github.com/actix/actix-web.git
synced 2025-03-10 13:31:10 +00:00
fix files test
This commit is contained in:
parent
ceb6d45bf2
commit
d77954d19e
1 changed files with 3 additions and 3 deletions
|
@ -214,11 +214,11 @@ fn directory_listing(
|
||||||
|
|
||||||
/// Static files handling
|
/// Static files handling
|
||||||
///
|
///
|
||||||
/// `StaticFile` handler must be registered with `App::service()` method.
|
/// `Files` service must be registered with `App::service()` method.
|
||||||
///
|
///
|
||||||
/// ```rust
|
/// ```rust
|
||||||
/// use actix_web::App;
|
/// use actix_web::App;
|
||||||
/// use actix_staticfiles as fs;
|
/// use actix_files as fs;
|
||||||
///
|
///
|
||||||
/// fn main() {
|
/// fn main() {
|
||||||
/// let app = App::new()
|
/// let app = App::new()
|
||||||
|
@ -240,7 +240,7 @@ pub struct Files<S, C = DefaultConfig> {
|
||||||
impl<S: 'static> Files<S> {
|
impl<S: 'static> Files<S> {
|
||||||
/// Create new `Files` instance for specified base directory.
|
/// Create new `Files` instance for specified base directory.
|
||||||
///
|
///
|
||||||
/// `StaticFile` 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_CPU_POOL environment variable.
|
||||||
pub fn new<T: Into<PathBuf>>(path: &str, dir: T) -> Files<S> {
|
pub fn new<T: Into<PathBuf>>(path: &str, dir: T) -> Files<S> {
|
||||||
|
|
Loading…
Reference in a new issue