diff options
author | Lars Wirzenius <liw@liw.fi> | 2021-11-20 10:20:33 +0200 |
---|---|---|
committer | Lars Wirzenius <liw@liw.fi> | 2021-11-20 10:20:33 +0200 |
commit | 1f2072e07a7e8b52f3a70453e7216b2b81590ba1 (patch) | |
tree | 3f0c64267d8116ad4b9f86e46ae1d4667c2bab6e /src/index.rs | |
parent | 7ff672f26e91404b71edfc25d6b27a6cda11609b (diff) | |
download | obnam2-1f2072e07a7e8b52f3a70453e7216b2b81590ba1.tar.gz |
chore: bump dependency on rusqlite to 0.26.1 and fix breakage
Sponsored-by: author
Diffstat (limited to 'src/index.rs')
-rw-r--r-- | src/index.rs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/index.rs b/src/index.rs index 5d31068..d548396 100644 --- a/src/index.rs +++ b/src/index.rs @@ -262,20 +262,20 @@ mod sql { } fn row_to_meta(row: &Row) -> rusqlite::Result<ChunkMeta> { - let hash: String = row.get(row.column_index("sha256")?)?; + let hash: String = row.get("sha256")?; let sha256 = Checksum::sha256_from_str_unchecked(&hash); - let generation: i32 = row.get(row.column_index("generation")?)?; + let generation: i32 = row.get("generation")?; let meta = if generation == 0 { ChunkMeta::new(&sha256) } else { - let ended: String = row.get(row.column_index("ended")?)?; + let ended: String = row.get("ended")?; ChunkMeta::new_generation(&sha256, &ended) }; Ok(meta) } fn row_to_id(row: &Row) -> rusqlite::Result<ChunkId> { - let id: String = row.get(row.column_index("id")?)?; + let id: String = row.get("id")?; Ok(ChunkId::recreate(&id)) } } |