Small tweak / typo fix to SQLite store
@@ -38,7 +38,7 @@ impl Message for SaveKeys {
type Reply = Result<(), SqlError>;
}
-/// Store implementation using memory.
+/// Store implementation using SQLite.
pub struct RusqliteStore {
/// TTL of session keys
expire_sessions: Duration,
@@ -92,8 +92,7 @@ impl RusqliteStore {
if schema_version == 0 {
// Note: can't use parameter binding in pragma.
conn.execute(&format!("PRAGMA application_id = {}", APP_ID), NO_PARAMS)?;
- return Ok(());
- }
+ } else {
let app_id: u32 =
conn.query_row("SELECT * FROM pragma_application_id()", NO_PARAMS, |row| {
row.get(0)
@@ -104,6 +103,7 @@ impl RusqliteStore {
app_id
);
}
+ }
Ok(())
}
