Skip to content

Commit 9adbe3f

Browse files
committed
add more conversions
1 parent 144eaae commit 9adbe3f

File tree

1 file changed

+7
-0
lines changed
  • crates/bevy_mod_scripting_core/src

1 file changed

+7
-0
lines changed

crates/bevy_mod_scripting_core/src/error.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ use std::{
33
borrow::Cow,
44
fmt::{Debug, Display},
55
ops::{Deref, DerefMut},
6+
str::Utf8Error,
67
sync::Arc,
78
};
89

@@ -224,6 +225,12 @@ impl From<InteropError> for ScriptError {
224225
}
225226
}
226227

228+
impl From<Utf8Error> for ScriptError {
229+
fn from(val: Utf8Error) -> Self {
230+
ScriptError::new_external(val)
231+
}
232+
}
233+
227234
pub trait FlattenError<O, E> {
228235
fn flatten_interop_error(self) -> Result<O, E>;
229236
}

0 commit comments

Comments
 (0)