diff options
author | Lars Wirzenius <liw@liw.fi> | 2022-04-19 04:53:35 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2022-04-19 04:53:35 +0000 |
commit | 8882409f31ddb4d77cb94dd6c57f27af1b3310d5 (patch) | |
tree | 62bb67504c47747f8ce202f4eb4121bb3d051223 /src/genmeta.rs | |
parent | 8da3f80d296dc1891159fe4fdc1787cecd9730d0 (diff) | |
parent | 18c0f4afab29e17c050208234becbfb5e2973746 (diff) | |
download | obnam2-8882409f31ddb4d77cb94dd6c57f27af1b3310d5.tar.gz |
Merge branch 'liw/checksum-types-try2' into 'main'
add support for migrating to new checksum types
Closes #203
See merge request obnam/obnam!228
Diffstat (limited to 'src/genmeta.rs')
-rw-r--r-- | src/genmeta.rs | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/genmeta.rs b/src/genmeta.rs index 2ce4c4c..d5b14a3 100644 --- a/src/genmeta.rs +++ b/src/genmeta.rs @@ -26,6 +26,11 @@ impl GenerationMeta { pub fn schema_version(&self) -> SchemaVersion { self.schema_version } + + /// Get a value corresponding to a key in the meta table. + pub fn get(&self, key: &str) -> Option<&String> { + self.extras.get(key) + } } fn metastr(map: &mut HashMap<String, String>, key: &str) -> Result<String, GenerationMetaError> { |