feat(q_learning): impl Error for DeserializeError
This commit is contained in:
1 parent
ee64266f16
commit
680c1e155b
1 file changed
+4
@@ -1,4 +1,5 @@
|
||||
use std::collections::HashMap;
|
||||
use std::error::Error;
|
||||
use std::fmt::Display;
|
||||
use std::hash::Hash;
|
||||
|
||||
@@ -35,8 +36,11 @@ pub trait Deserialize {
|
||||
Self: Sized;
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub struct DeserializeError;
|
||||
|
||||
impl Error for DeserializeError {}
|
||||
|
||||
impl Display for DeserializeError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
write!(f, "Error deserializing input")
|
||||
|
||||
Reference in new issue
Block a user