aboutsummaryrefslogtreecommitdiff
path: root/azalea-nbt/src/error.rs
diff options
context:
space:
mode:
authormat <github@matdoes.dev>2022-04-24 17:37:57 -0500
committermat <github@matdoes.dev>2022-04-24 17:37:57 -0500
commit3e507f0db4020eaf406ba69aae3d4dc1301d29ac (patch)
treeca6c127c9db6dfd14511e98944fc031fe5f1e43a /azalea-nbt/src/error.rs
parent9f576c5600ba9a244bc0d433bb7de174284066a2 (diff)
parentb7641ff308aab7840d2a2253ae50f8ee496b2a97 (diff)
downloadazalea-drasl-3e507f0db4020eaf406ba69aae3d4dc1301d29ac.tar.xz
Merge branch 'main' into auth
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
+ }
+}