From 2e0a4aaa8468418065ff225da18142675a96b82e Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Sun, 9 Oct 2022 12:44:53 -0700 Subject: feat(tvix/eval): From for ErrorKind Change-Id: I074d9e862fbdd4e78e443cbaf0e77c7ffe825a10 Signed-off-by: Adam Joseph Reviewed-on: https://cl.tvl.fyi/c/depot/+/6911 Tested-by: BuildkiteCI Reviewed-by: tazjin --- tvix/eval/src/errors.rs | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tvix/eval/src/errors.rs b/tvix/eval/src/errors.rs index 543ae7d41ea5..1c0d71f6188f 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 for ErrorKind { } } +impl From 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). -- cgit 1.4.1