@@ -6,6 +6,7 @@ use crate::{
66 DEFAULT_MSIZE , FileType , MAXWELEM , NineP , Qid , RawStat , Rdata , SharedBuf , Tdata , Tmessage ,
77 } ,
88} ;
9+ use parking_lot:: RwLock ;
910use simple_coro:: { Coro , Handle , ReadyCoro } ;
1011use std:: {
1112 cmp:: min,
@@ -14,7 +15,7 @@ use std::{
1415 future:: Future ,
1516 ops:: { Deref , DerefMut } ,
1617 path:: { Path , PathBuf } ,
17- sync:: { Arc , RwLock } ,
18+ sync:: Arc ,
1819} ;
1920
2021/// Marker afid to denode that auth is not required for establishing connections
@@ -153,7 +154,7 @@ impl SessionType for Attached {}
153154
154155impl Drop for Attached {
155156 fn drop ( & mut self ) {
156- let mut guard = self . qids . write ( ) . unwrap ( ) ;
157+ let mut guard = self . qids . write ( ) ;
157158 for fm in self . fids . values ( ) {
158159 if let Some ( meta) = guard. get_mut ( & fm. qid ) {
159160 meta. opened_by . remove ( & self . client_id ) ;
@@ -219,7 +220,7 @@ where
219220 where
220221 F : FnOnce ( & BTreeMap < u64 , QidMeta > ) -> U ,
221222 {
222- f ( & self . qids . read ( ) . unwrap ( ) )
223+ f ( & self . qids . read ( ) )
223224 }
224225
225226 /// Run a closure with mutable access to the shared server-level Qid map.
@@ -231,7 +232,7 @@ where
231232 where
232233 F : FnOnce ( & mut BTreeMap < u64 , QidMeta > ) -> U ,
233234 {
234- f ( & mut self . qids . write ( ) . unwrap ( ) )
235+ f ( & mut self . qids . write ( ) )
235236 }
236237
237238 pub ( crate ) fn parent_qid ( & self , qid : u64 ) -> Option < u64 > {
0 commit comments