Skip to content

Commit a91ff09

Browse files
authored
Merge pull request #99 from kinode-dao/develop
develop 0.9.3
2 parents 44f5855 + e84d1dc commit a91ff09

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

src/lib.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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
/// });

src/vfs/file.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)