Make the engine index booleans

The engine will see the values like text "true" and "false"
This commit is contained in:
Clément Renault 2020-03-31 10:39:58 +02:00
parent 3b25bd71ab
commit 69aee870da
No known key found for this signature in database
GPG key ID: 0151CDAB43460DAE
2 changed files with 42 additions and 4 deletions

View file

@ -16,10 +16,8 @@ impl ser::Serializer for ConvertToString {
type SerializeStruct = StructConvertToString;
type SerializeStructVariant = ser::Impossible<Self::Ok, Self::Error>;
fn serialize_bool(self, _value: bool) -> Result<Self::Ok, Self::Error> {
Err(SerializerError::UnserializableType {
type_name: "boolean",
})
fn serialize_bool(self, value: bool) -> Result<Self::Ok, Self::Error> {
Ok(value.to_string())
}
fn serialize_char(self, value: char) -> Result<Self::Ok, Self::Error> {