diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-08-01 20:34:35 +0300 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-08-01 20:55:04 +0300 |
commit | 2bc07b176bcf63f94bf6f1cca0ade2505958a15d (patch) | |
tree | e1dcf85cc76051baf44a63c1105ced26935109c2 /src/generation.rs | |
parent | 0835677f33fe8fa89ee96e4c1b45e5711e10b461 (diff) | |
download | obnam2-2bc07b176bcf63f94bf6f1cca0ade2505958a15d.tar.gz |
refactor: add a type alias for generation ids
This will make it harder to accidentally use a string. Can still be
confused with a chunk id.
Sponsored-by: author
Diffstat (limited to 'src/generation.rs')
-rw-r--r-- | src/generation.rs | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/generation.rs b/src/generation.rs index 25fc14d..66b4647 100644 --- a/src/generation.rs +++ b/src/generation.rs @@ -9,6 +9,9 @@ use std::path::{Path, PathBuf}; /// An identifier for a file in a generation. type FileId = i64; +/// An identifier for a generation. +pub type GenId = ChunkId; + /// A nascent backup generation. /// /// A nascent generation is one that is being prepared. It isn't |