diff options
Diffstat (limited to 'common/rust/src')
| -rw-r--r-- | common/rust/src/error.rs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/common/rust/src/error.rs b/common/rust/src/error.rs index be1607a..1a24657 100644 --- a/common/rust/src/error.rs +++ b/common/rust/src/error.rs @@ -10,3 +10,9 @@ impl fmt::Display for NovaError { write!(f, "An error occurred within the nova system: {}", self.message) // user-facing output } } + +impl From<&str> for NovaError { + fn from(message: &str) -> Self { + NovaError { message: message.to_string() } + } +}
\ No newline at end of file |
