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);