@@ -9,11 +9,11 @@ use std::sync::{Arc, Mutex};
9
9
10
10
use crate :: fs:: { Metadata , Permissions } ;
11
11
use crate :: future;
12
- use crate :: utils:: Context as _;
13
12
use crate :: io:: { self , Read , Seek , SeekFrom , Write } ;
14
13
use crate :: path:: Path ;
15
14
use crate :: prelude:: * ;
16
15
use crate :: task:: { self , spawn_blocking, Context , Poll , Waker } ;
16
+ use crate :: utils:: Context as _;
17
17
18
18
/// An open file on the filesystem.
19
19
///
@@ -114,8 +114,7 @@ impl File {
114
114
pub async fn open < P : AsRef < Path > > ( path : P ) -> io:: Result < File > {
115
115
let path = path. as_ref ( ) . to_owned ( ) ;
116
116
let file = spawn_blocking ( move || {
117
- std:: fs:: File :: open ( & path)
118
- . context ( || format ! ( "Could not open {}" , path. display( ) ) )
117
+ std:: fs:: File :: open ( & path) . context ( || format ! ( "Could not open `{}`" , path. display( ) ) )
119
118
} )
120
119
. await ?;
121
120
Ok ( File :: new ( file, true ) )
@@ -154,7 +153,7 @@ impl File {
154
153
let path = path. as_ref ( ) . to_owned ( ) ;
155
154
let file = spawn_blocking ( move || {
156
155
std:: fs:: File :: create ( & path)
157
- . context ( || format ! ( "Could not create {} " , path. display( ) ) )
156
+ . context ( || format ! ( "Could not create `{}` " , path. display( ) ) )
158
157
} )
159
158
. await ?;
160
159
Ok ( File :: new ( file, true ) )
0 commit comments