summaryrefslogtreecommitdiff
path: root/src/login/history.rs
diff options
context:
space:
mode:
authorKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
committerKit La Touche <kit@transneptune.net>2024-10-23 21:56:31 -0400
commit1f769855df2d9cf2bca883a0475670f227e3678b (patch)
tree6c94d9c868eb022588a07245df978478034ac5dd /src/login/history.rs
parent8f360dd9cc45bb14431238ccc5e3d137c020fa7b (diff)
parent461814e5174cef1be3e07b4e4069314e9bcbedd6 (diff)
Merge branch 'main' into wip/mobile
Diffstat (limited to 'src/login/history.rs')
-rw-r--r--src/login/history.rs6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/login/history.rs b/src/login/history.rs
index f8d81bb..daad579 100644
--- a/src/login/history.rs
+++ b/src/login/history.rs
@@ -20,7 +20,6 @@ impl History {
// if this returns a redacted or modified version of the login. If we implement
// renames by redacting the original name, then this should return the edited
// login, not the original, even if that's not how it was "as created.")
- #[cfg(test)]
pub fn as_created(&self) -> Login {
self.login.clone()
}
@@ -30,6 +29,11 @@ impl History {
.filter(Sequence::up_to(resume_point.into()))
.collect()
}
+
+ // Snapshot of this login, as of all events recorded in this history.
+ pub fn as_snapshot(&self) -> Option<Login> {
+ self.events().collect()
+ }
}
// Events interface