summaryrefslogtreecommitdiff
path: root/src/login/history.rs
diff options
context:
space:
mode:
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