summaryrefslogtreecommitdiff
path: root/src/generation.rs
diff options
context:
space:
mode:
authorLars Wirzenius <liw@liw.fi>2020-12-30 13:33:57 +0200
committerLars Wirzenius <liw@liw.fi>2020-12-30 13:56:20 +0200
commitc492bc19aaf404ab4115b8d7f06eff81a6480b4e (patch)
tree99bb10c1cfc99bded3b7187f18541c9e7c676ead /src/generation.rs
parent48639d00710cf945cff7298cf927efc7275364e2 (diff)
downloadobnam2-c492bc19aaf404ab4115b8d7f06eff81a6480b4e.tar.gz
feat! store and show timestamp for each backup generation
This changes the output format of "obnam list".
Diffstat (limited to 'src/generation.rs')
-rw-r--r--src/generation.rs5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/generation.rs b/src/generation.rs
index fdfd7f1..dc9bf0c 100644
--- a/src/generation.rs
+++ b/src/generation.rs
@@ -164,9 +164,10 @@ pub struct FinishedGeneration {
}
impl FinishedGeneration {
- pub fn new(id: ChunkId, ended: &str) -> Self {
+ pub fn new(id: &str, ended: &str) -> Self {
+ let id = id.parse().unwrap(); // this never fails
Self {
- id: id.clone(),
+ id,
ended: ended.to_string(),
}
}