aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src/error.rs
diff options
context:
space:
mode:
Diffstat (limited to 'azalea-nbt/src/error.rs')
-rwxr-xr-x[-rw-r--r--]azalea-nbt/src/error.rs11
1 files changed, 11 insertions, 0 deletions
diff --git a/azalea-nbt/src/error.rs b/azalea-nbt/src/error.rs
index 05ff15e0..219921e4 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(_: std::io::Error) -> Self {
+ Error::WriteError
+ }
+}
+impl From<std::string::FromUtf8Error> for Error {
+ fn from(_: std::string::FromUtf8Error) -> Self {
+ Error::WriteError
+ }
+}