diff options
Diffstat (limited to 'azalea-nbt/src/error.rs')
| -rwxr-xr-x[-rw-r--r--] | azalea-nbt/src/error.rs | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/azalea-nbt/src/error.rs b/azalea-nbt/src/error.rs index 05ff15e0..278d2770 100644..100755 --- a/azalea-nbt/src/error.rs +++ b/azalea-nbt/src/error.rs @@ -14,3 +14,14 @@ impl std::fmt::Display for Error { } } } + +impl From<std::io::Error> for Error { + fn from(err: std::io::Error) -> Self { + Error::WriteError + } +} +impl From<std::string::FromUtf8Error> for Error { + fn from(err: std::string::FromUtf8Error) -> Self { + Error::WriteError + } +}
\ No newline at end of file |
