diff options
author | Lars Wirzenius <liw@liw.fi> | 2020-12-30 13:33:57 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2020-12-30 13:56:20 +0200 |
commit | c492bc19aaf404ab4115b8d7f06eff81a6480b4e (patch) | |
tree | 99bb10c1cfc99bded3b7187f18541c9e7c676ead /src/generation.rs | |
parent | 48639d00710cf945cff7298cf927efc7275364e2 (diff) | |
download | obnam2-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.rs | 5 |
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(), } } |