diff --git a/src/types/string.rs b/src/types/string.rs index 5c1099c..7808b69 100644 --- a/src/types/string.rs +++ b/src/types/string.rs @@ -13,7 +13,7 @@ impl FromLisp<'_> for String { #[cfg(feature = "utf-8-validation")] fn from_lisp(value: Value<'_>) -> Result { let bytes = value.env.string_bytes(value)?; - Ok(String::from_utf8(bytes).unwrap()) + String::from_utf8(bytes).map_err(|e| e.into()) } }