diff options
| author | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-24 17:08:31 -0700 | 
|---|---|---|
| committer | Bryan Newbold <bnewbold@robocracy.org> | 2018-07-24 17:08:31 -0700 | 
| commit | f080bf59d9dcdd95376b6c8a128070c6528e2167 (patch) | |
| tree | 79883ca26f916583cd00a147bcc92108ac3a8e5c /rust/src/database_models.rs | |
| parent | ea2f4486d7c2e7c6a688ca11aa7db75f622887d3 (diff) | |
| download | fatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.tar.gz fatcat-f080bf59d9dcdd95376b6c8a128070c6528e2167.zip  | |
whole bunch of clippy fixes
Diffstat (limited to 'rust/src/database_models.rs')
| -rw-r--r-- | rust/src/database_models.rs | 8 | 
1 files changed, 4 insertions, 4 deletions
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<EntityEdit>; +    fn into_model(self) -> Result<EntityEdit>;  }  // 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<EntityEdit> { +            fn into_model(self) -> Result<EntityEdit> {                  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),  | 
