Tweaks from code review

Co-authored-by: Dustin J. Mitchell <dustin@v.igoro.us>
This commit is contained in:
dbr/Ben
2021-09-04 12:05:30 +09:30
committed by GitHub
parent 86deed3197
commit 477bf9e328
2 changed files with 3 additions and 3 deletions

View File

@@ -41,7 +41,7 @@ impl FromSql for Client {
}
}
/// Parsers Operation stored as JSON in string column
/// Parses Operation stored as JSON in string column
impl ToSql for Client {
fn to_sql(&self) -> rusqlite::Result<rusqlite::types::ToSqlOutput<'_>> {
let s = serde_json::to_string(&self)
@@ -72,7 +72,7 @@ impl SqliteStorage {
let queries = vec![
"CREATE TABLE IF NOT EXISTS clients (client_key STRING PRIMARY KEY, latest_version_id STRING);",
"CREATE TABLE IF NOT EXISTS versions (version_id STRING PRIMARY KEY, client_key STRING, parent_version_id STRING, history_segment STRING);",
"CREATE TABLE IF NOT EXISTS versions (version_id STRING PRIMARY KEY, client_key STRING, parent_version_id STRING, history_segment BLOB);",
];
for q in queries {
txn.execute(q, []).context("Creating table")?;

View File

@@ -288,7 +288,7 @@ impl<'t> StorageTxn for Txn<'t> {
let rows: Vec<Result<(usize, Uuid), _>> = rows.collect();
let mut res = Vec::with_capacity(rows.len());
for _ in 0..self.get_next_working_set_number().context("HUh")? {
for _ in 0..self.get_next_working_set_number().context("Getting working set number")? {
res.push(None);
}
for r in rows {