Skip to content

Commit 260c609

Browse files
authored
Implement Error for wasi::io::error::Error (#86)
1 parent 44af919 commit 260c609

File tree

2 files changed

+10
-0
lines changed

2 files changed

+10
-0
lines changed

src/errors.rs

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
impl core::fmt::Display for crate::io::error::Error {
2+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
3+
f.write_str(&self.to_debug_string())
4+
}
5+
}
6+
7+
#[cfg(feature = "std")]
8+
impl std::error::Error for crate::io::error::Error {}

src/lib.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -179,6 +179,8 @@
179179
#[cfg(feature = "std")]
180180
extern crate std;
181181

182+
mod errors;
183+
182184
// These modules are all auto-generated by `./ci/regenerate.sh`
183185
mod bindings;
184186
#[allow(unused_imports)]

0 commit comments

Comments
 (0)