From f080bf59d9dcdd95376b6c8a128070c6528e2167 Mon Sep 17 00:00:00 2001 From: Bryan Newbold Date: Tue, 24 Jul 2018 17:08:31 -0700 Subject: whole bunch of clippy fixes --- rust/src/database_models.rs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'rust/src/database_models.rs') diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs index 58dc4d42..f875b492 100644 --- a/rust/src/database_models.rs +++ b/rust/src/database_models.rs @@ -32,7 +32,7 @@ pub trait EntityIdentRow { } pub trait EntityEditRow { - fn to_model(self) -> Result; + fn into_model(self) -> Result; } // Helper for constructing tables @@ -53,7 +53,7 @@ macro_rules! entity_structs { impl EntityEditRow for $edit_struct { /// Go from a row (SQL model) to an API model - fn to_model(self) -> Result { + fn into_model(self) -> Result { Ok(EntityEdit { editgroup_id: uuid2fcid(&self.editgroup_id), revision: self.rev_id.map(|v| v.to_string()), @@ -291,7 +291,7 @@ pub struct EditgroupRow { impl EditgroupRow { /// Returns an Edigroup API model *without* the entity edits actually populated. Useful for, /// eg, entity history queries (where we already have the entity edit we want) - pub fn to_model_partial(self) -> Editgroup { + pub fn into_model_partial(self) -> Editgroup { Editgroup { id: Some(uuid2fcid(&self.id)), editor_id: uuid2fcid(&self.editor_id), @@ -321,7 +321,7 @@ pub struct ChangelogRow { } impl ChangelogRow { - pub fn to_model(self) -> ChangelogEntry { + pub fn into_model(self) -> ChangelogEntry { ChangelogEntry { index: self.id, editgroup_id: uuid2fcid(&self.editgroup_id), -- cgit v1.2.3