From 7778cdf0c495a04f4f5f3f85b78348c8037a5771 Mon Sep 17 00:00:00 2001 From: Owen Jacobson Date: Fri, 20 Jun 2025 19:47:46 -0400 Subject: Remove the snapshot fields from `/api/boot`. Clients now _must_ construct their state from the event stream; it is no longer possible for them to delegate that work to the server. --- src/user/history.rs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) (limited to 'src/user/history.rs') diff --git a/src/user/history.rs b/src/user/history.rs index ae7a561..72e0aee 100644 --- a/src/user/history.rs +++ b/src/user/history.rs @@ -2,7 +2,7 @@ use super::{ Id, User, event::{Created, Event}, }; -use crate::event::{Instant, Sequence}; +use crate::event::Instant; #[derive(Clone, Debug, Eq, PartialEq)] pub struct History { @@ -24,12 +24,6 @@ impl History { self.user.clone() } - pub fn as_of(&self, resume_point: Sequence) -> Option { - self.events() - .filter(Sequence::up_to(resume_point)) - .collect() - } - // Snapshot of this user, as of all events recorded in this history. pub fn as_snapshot(&self) -> Option { self.events().collect() -- cgit v1.2.3