From 91b44a27591f3781c87ba5fe910b8ec02b9e31d4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Renault?= Date: Thu, 22 Aug 2019 14:28:27 +0200 Subject: [PATCH] chore: Change the `Box` to be marked `dyn` --- meilidb-schema/src/lib.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/meilidb-schema/src/lib.rs b/meilidb-schema/src/lib.rs index 43e82a168..85325a0f2 100644 --- a/meilidb-schema/src/lib.rs +++ b/meilidb-schema/src/lib.rs @@ -99,14 +99,14 @@ struct InnerSchema { } impl Schema { - pub fn from_toml(mut reader: R) -> Result> { + pub fn from_toml(mut reader: R) -> Result> { let mut buffer = Vec::new(); reader.read_to_end(&mut buffer)?; let builder: SchemaBuilder = toml::from_slice(&buffer)?; Ok(builder.build()) } - pub fn to_toml(&self, mut writer: W) -> Result<(), Box> { + pub fn to_toml(&self, mut writer: W) -> Result<(), Box> { let identifier = self.inner.identifier.clone(); let attributes = self.attributes_ordered(); let builder = SchemaBuilder { identifier, attributes }; @@ -117,14 +117,14 @@ impl Schema { Ok(()) } - pub fn from_json(mut reader: R) -> Result> { + pub fn from_json(mut reader: R) -> Result> { let mut buffer = Vec::new(); reader.read_to_end(&mut buffer)?; let builder: SchemaBuilder = serde_json::from_slice(&buffer)?; Ok(builder.build()) } - pub fn to_json(&self, mut writer: W) -> Result<(), Box> { + pub fn to_json(&self, mut writer: W) -> Result<(), Box> { let identifier = self.inner.identifier.clone(); let attributes = self.attributes_ordered(); let builder = SchemaBuilder { identifier, attributes }; @@ -245,7 +245,7 @@ mod tests { } #[test] - fn serialize_deserialize_toml() -> Result<(), Box> { + fn serialize_deserialize_toml() -> Result<(), Box> { let mut builder = SchemaBuilder::with_identifier("id"); builder.new_attribute("alpha", DISPLAYED); builder.new_attribute("beta", DISPLAYED | INDEXED); @@ -278,7 +278,7 @@ mod tests { } #[test] - fn serialize_deserialize_json() -> Result<(), Box> { + fn serialize_deserialize_json() -> Result<(), Box> { let mut builder = SchemaBuilder::with_identifier("id"); builder.new_attribute("alpha", DISPLAYED); builder.new_attribute("beta", DISPLAYED | INDEXED);