diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-01-19 06:45:25 +0000 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-01-19 06:45:25 +0000 |
commit | 093a15c354a71382212bfc2e4a564f81781755a8 (patch) | |
tree | c5610dbbb0e568a878c2e18c01d5aaaef2c7639a /src/index.rs | |
parent | 6fa225df872ea63ddeffbc017f30c0eb96feb8ce (diff) | |
parent | 7391e26d18eb6833a6191e6359346f3c0c502607 (diff) | |
download | obnam2-093a15c354a71382212bfc2e4a564f81781755a8.tar.gz |
Merge branch 'errors' into 'main'
refactor: use ChunkId directly in errors, instead of String
See merge request larswirzenius/obnam!68
Diffstat (limited to 'src/index.rs')
-rw-r--r-- | src/index.rs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/index.rs b/src/index.rs index fd38611..d527839 100644 --- a/src/index.rs +++ b/src/index.rs @@ -189,14 +189,14 @@ mod sql { eprintln!("lookup: meta={:?}", meta); metas.push(meta); } else { - let err = ObnamError::DuplicateChunk(id.to_string()); + let err = ObnamError::DuplicateChunk(id.clone()); error!("{}", err); return Err(err.into()); } } if metas.len() == 0 { eprintln!("lookup: no hits"); - return Err(ObnamError::MissingChunk(format!("{}", id)).into()); + return Err(ObnamError::MissingChunk(id.clone()).into()); } let r = metas[0].clone(); Ok(r) |