about summary refs log tree commit diff
path: root/tvix/eval
diff options
context:
space:
mode:
authorAdam Joseph <adam@westernsemico.com>2022-10-09T19·44-0700
committerAdam Joseph <adam@westernsemico.com>2022-10-12T04·22+0000
commit2e0a4aaa8468418065ff225da18142675a96b82e (patch)
tree8804b15c2d560690115b39078f474c48b6396eb8 /tvix/eval
parent8149ca5c3802d0dd757224afb74f6b46cc55a7dd (diff)
feat(tvix/eval): From<Utf8Error> for ErrorKind r/5109
Change-Id: I074d9e862fbdd4e78e443cbaf0e77c7ffe825a10
Signed-off-by: Adam Joseph <adam@westernsemico.com>
Reviewed-on: https://cl.tvl.fyi/c/depot/+/6911
Tested-by: BuildkiteCI
Reviewed-by: tazjin <tazjin@tvl.su>
Diffstat (limited to 'tvix/eval')
-rw-r--r--tvix/eval/src/errors.rs7
1 files changed, 7 insertions, 0 deletions
diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs
index 543ae7d41e..1c0d71f618 100644
--- a/tvix/eval/src/errors.rs
+++ b/tvix/eval/src/errors.rs
@@ -3,6 +3,7 @@ use crate::value::CoercionKind;
 use std::io;
 use std::path::PathBuf;
 use std::rc::Rc;
+use std::str::Utf8Error;
 use std::sync::Arc;
 use std::{fmt::Display, num::ParseIntError};
 
@@ -140,6 +141,12 @@ impl From<ParseIntError> for ErrorKind {
     }
 }
 
+impl From<Utf8Error> for ErrorKind {
+    fn from(_: Utf8Error) -> Self {
+        Self::NotImplemented("FromUtf8Error not handled: https://b.tvl.fyi/issues/189")
+    }
+}
+
 /// Implementation used if errors occur while forcing thunks (which
 /// can potentially be threaded through a few contexts, i.e. nested
 /// thunks).