mirror of
https://github.com/Noratrieb/terustform.git
synced 2026-01-14 16:35:11 +01:00
start parsing values incorrectly
This commit is contained in:
parent
c4e62f9d2d
commit
a7822229f3
8 changed files with 337 additions and 35 deletions
|
|
@ -10,3 +10,17 @@ pub struct Diagnostics {
|
|||
}
|
||||
|
||||
pub type DResult<T> = Result<T, Diagnostics>;
|
||||
|
||||
impl Diagnostics {
|
||||
pub fn error_string(msg: String) -> Self {
|
||||
Self {
|
||||
errors: vec![msg],
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
impl<E: std::error::Error + std::fmt::Debug> From<E> for Diagnostics {
|
||||
fn from(value: E) -> Self {
|
||||
Self::error_string(format!("{:?}", value))
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue