Drop dependency on storekey::encode::Error
in the serialiser (#3878)
This commit is contained in:
parent
e62bedf9bb
commit
126ca7a268
2 changed files with 5 additions and 2 deletions
|
@ -936,6 +936,10 @@ pub enum Error {
|
|||
/// An error related to live query occurred
|
||||
#[error("Failed to process Live Query: {0}")]
|
||||
LiveQueryError(LiveQueryCause),
|
||||
|
||||
/// The supplied type could not be serialiazed into `sql::Value`
|
||||
#[error("Serialization error: {0}")]
|
||||
Serialization(String),
|
||||
}
|
||||
|
||||
impl From<Error> for String {
|
||||
|
|
|
@ -35,7 +35,6 @@ use serde::ser::Serialize;
|
|||
use serde::ser::SerializeMap as _;
|
||||
use serde::ser::SerializeSeq as _;
|
||||
use std::fmt::Display;
|
||||
use storekey::encode::Error as EncodeError;
|
||||
use vec::SerializeValueVec;
|
||||
|
||||
/// Convert a `T` into `surrealdb::sql::Value` which is an enum that can represent any valid SQL data.
|
||||
|
@ -51,7 +50,7 @@ impl serde::ser::Error for Error {
|
|||
where
|
||||
T: Display,
|
||||
{
|
||||
Self::Encode(EncodeError::Message(msg.to_string()))
|
||||
Self::Serialization(msg.to_string())
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue