mirror of
https://github.com/actix/actix-extras.git
synced 2024-11-24 16:02:59 +01:00
update test
This commit is contained in:
parent
42d2a29b1d
commit
824244622f
@ -82,7 +82,7 @@ impl NamedFile {
|
|||||||
self.path.as_path()
|
self.path.as_path()
|
||||||
}
|
}
|
||||||
|
|
||||||
/// Returns reference to the underlying `File` object.
|
/// Set `CpuPool` to use
|
||||||
#[inline]
|
#[inline]
|
||||||
pub fn set_cpu_pool(mut self, cpu_pool: CpuPool) -> Self {
|
pub fn set_cpu_pool(mut self, cpu_pool: CpuPool) -> Self {
|
||||||
self.cpu_pool = Some(cpu_pool);
|
self.cpu_pool = Some(cpu_pool);
|
||||||
@ -502,7 +502,8 @@ mod tests {
|
|||||||
#[test]
|
#[test]
|
||||||
fn test_named_file() {
|
fn test_named_file() {
|
||||||
assert!(NamedFile::open("test--").is_err());
|
assert!(NamedFile::open("test--").is_err());
|
||||||
let mut file = NamedFile::open("Cargo.toml").unwrap();
|
let mut file = NamedFile::open("Cargo.toml").unwrap()
|
||||||
|
.set_cpu_pool(CpuPool::new(1));
|
||||||
{ file.file();
|
{ file.file();
|
||||||
let _f: &File = &file; }
|
let _f: &File = &file; }
|
||||||
{ let _f: &mut File = &mut file; }
|
{ let _f: &mut File = &mut file; }
|
||||||
|
Loading…
Reference in New Issue
Block a user