@@ -9,11 +9,11 @@ use std::sync::{Arc, Mutex};
99
1010use crate :: fs:: { Metadata , Permissions } ;
1111use crate :: future;
12- use crate :: utils:: Context as _;
1312use crate :: io:: { self , Read , Seek , SeekFrom , Write } ;
1413use crate :: path:: Path ;
1514use crate :: prelude:: * ;
1615use crate :: task:: { self , spawn_blocking, Context , Poll , Waker } ;
16+ use crate :: utils:: Context as _;
1717
1818/// An open file on the filesystem.
1919///
@@ -114,8 +114,7 @@ impl File {
114114 pub async fn open < P : AsRef < Path > > ( path : P ) -> io:: Result < File > {
115115 let path = path. as_ref ( ) . to_owned ( ) ;
116116 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( ) ) )
119118 } )
120119 . await ?;
121120 Ok ( File :: new ( file, true ) )
@@ -154,7 +153,7 @@ impl File {
154153 let path = path. as_ref ( ) . to_owned ( ) ;
155154 let file = spawn_blocking ( move || {
156155 std:: fs:: File :: create ( & path)
157- . context ( || format ! ( "Could not create {} " , path. display( ) ) )
156+ . context ( || format ! ( "Could not create `{}` " , path. display( ) ) )
158157 } )
159158 . await ?;
160159 Ok ( File :: new ( file, true ) )
0 commit comments