File tree Expand file tree Collapse file tree 2 files changed +10
-2
lines changed
Expand file tree Collapse file tree 2 files changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -236,7 +236,7 @@ where
236236/// field_two: HashSet<String>,
237237/// }
238238///
239- /// get_typed_blob(|bytes| Ok( bincode::deserialize(bytes)? )).unwrap_or(MyType {
239+ /// get_typed_blob(|bytes| bincode::deserialize(bytes)).unwrap_or(MyType {
240240/// field: HashMap::new(),
241241/// field_two: HashSet::new(),
242242/// });
@@ -272,7 +272,7 @@ where
272272/// field_two: HashSet<String>,
273273/// }
274274///
275- /// get_typed_state(|bytes| Ok( bincode::deserialize(bytes)? )).unwrap_or(MyStateType {
275+ /// get_typed_state(|bytes| bincode::deserialize(bytes)).unwrap_or(MyStateType {
276276/// field: HashMap::new(),
277277/// field_two: HashSet::new(),
278278/// });
Original file line number Diff line number Diff line change @@ -323,6 +323,14 @@ impl File {
323323 }
324324}
325325
326+ impl Drop for File {
327+ fn drop ( & mut self ) {
328+ vfs_request ( & self . path , VfsAction :: CloseFile )
329+ . send ( )
330+ . unwrap ( ) ;
331+ }
332+ }
333+
326334/// Creates a drive with path "/package_id/drive", gives you read and write caps.
327335/// Will only work on the same package_id as you're calling it from, unless you
328336/// have root capabilities.
You can’t perform that action at this time.
0 commit comments