aboutsummaryrefslogtreecommitdiffstats
path: root/rust/src/database_models.rs
diff options
context:
space:
mode:
authorbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
committerbnewbold <bnewbold@archive.org>2022-10-06 01:56:36 +0000
commite5ee112a13cc331a488d395c4da1f80a9dd61930 (patch)
tree396a6fd04188385217b6e3c0cae4f91069f1ec38 /rust/src/database_models.rs
parent8bdd5fd92a33cf05424447241033bd529b68af77 (diff)
parent9faf093b50da190a5efee47f3b00bd425a940c40 (diff)
downloadfatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.tar.gz
fatcat-e5ee112a13cc331a488d395c4da1f80a9dd61930.zip
Merge branch 'bnewbold-rust-macaroons-upstream' into 'master'
rust: refactor closer to 'macaroon' crate See merge request webgroup/fatcat!143
Diffstat (limited to 'rust/src/database_models.rs')
-rw-r--r--rust/src/database_models.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/rust/src/database_models.rs b/rust/src/database_models.rs
index 0427f9c8..b3b64126 100644
--- a/rust/src/database_models.rs
+++ b/rust/src/database_models.rs
@@ -13,7 +13,7 @@ use uuid::Uuid;
// Ugh. I thought the whole point was to *not* do this, but:
// https://github.com/diesel-rs/diesel/issues/1589
-#[derive(Clone, Copy, Debug, PartialEq)]
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
pub enum EntityState {
WorkInProgress,
Active(Uuid),
@@ -552,7 +552,7 @@ pub struct RefsBlobRow {
pub refs_json: serde_json::Value,
}
-#[derive(Debug, Clone, PartialEq, Serialize, Deserialize)]
+#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, Eq)]
/// This model is a stable representation of what goes in a RefsBlobRow `refs_json` field (an array
/// of this model). We could rely on the `ReleaseRef` API spec model directly, but that would lock
/// the database contents to the API spec rigidly; by defining this struct independently, we can
@@ -684,8 +684,8 @@ impl EditgroupRow {
Editgroup {
editgroup_id: Some(uuid2fcid(&self.id)),
editor_id: Some(uuid2fcid(&self.editor_id)),
- editor: editor,
- changelog_index: changelog_index,
+ editor,
+ changelog_index,
created: Some(chrono::DateTime::from_utc(self.created, chrono::Utc)),
submitted: self
.submitted