]> git.scottworley.com Git - tattlekey/commitdiff
server: Drop `ago` field
authorScott Worley <scottworley@scottworley.com>
Tue, 10 Oct 2023 23:16:20 +0000 (16:16 -0700)
committerScott Worley <scottworley@scottworley.com>
Wed, 11 Oct 2023 01:50:37 +0000 (18:50 -0700)
server/src/main.rs

index 94a47d854dac42599b5001993f1d8b5385052d38..37de6bd44fae83acde13602b49a1a90876938441 100644 (file)
@@ -30,7 +30,6 @@ struct MessageKey {
 #[derive(Debug)]
 struct Message {
     key: MessageKey,
 #[derive(Debug)]
 struct Message {
     key: MessageKey,
-    ago: u32,
     t: SystemTime,
 }
 
     t: SystemTime,
 }
 
@@ -43,7 +42,6 @@ impl From<&[u8; MESSAGE_SIZE]> for Message {
                 device: u16::from_be_bytes(value[4..=5].try_into().expect("I can't count")),
                 seq: u16::from_be_bytes(value[6..=7].try_into().expect("I can't count")),
             },
                 device: u16::from_be_bytes(value[4..=5].try_into().expect("I can't count")),
                 seq: u16::from_be_bytes(value[6..=7].try_into().expect("I can't count")),
             },
-            ago,
             t: SystemTime::now() - Duration::new(ago.into(), 0),
         }
     }
             t: SystemTime::now() - Duration::new(ago.into(), 0),
         }
     }