mikros: Close files on drop
This commit is contained in:
parent
6dba227540
commit
5f82526318
@ -375,6 +375,19 @@ pub fn set_times(&self, _times: FileTimes) -> io::Result<()> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Drop for File {
|
||||
fn drop(&mut self) {
|
||||
let _ = &rpc::send_call(
|
||||
self.fs_pid,
|
||||
1,
|
||||
2,
|
||||
&postcard::to_allocvec(&self.fd)
|
||||
.unwrap(),
|
||||
)
|
||||
.get_return();
|
||||
}
|
||||
}
|
||||
|
||||
impl DirBuilder {
|
||||
pub fn new() -> DirBuilder {
|
||||
DirBuilder {}
|
||||
|
Loading…
Reference in New Issue
Block a user