cargo fmt

...necessary to pass CI since changes to stable Rust's formatting.
This commit is contained in:
Scott Lamb
2023-09-30 16:15:02 -07:00
parent e103a709a0
commit b4eb573ca2
4 changed files with 21 additions and 6 deletions

View File

@@ -2274,8 +2274,7 @@ pub(crate) fn check_schema_version(conn: &rusqlite::Connection) -> Result<(), Er
let Some(ver) = get_schema_version(conn)? else {
bail!(
FailedPrecondition,
msg(
"no such table: version.\n\n\
msg("no such table: version.\n\n\
If you have created an empty database by hand, delete it and use `nvr init` \
instead, as noted in the installation instructions: \
<https://github.com/scottlamb/moonfire-nvr/blob/master/guide/install.md>\n\n\

View File

@@ -759,7 +759,10 @@ impl State {
if let Entry::Occupied(ref e) = e {
let (prev_time, prev_state) = *e.get();
let Some(s) = signals_by_id.get_mut(&signal) else {
bail!(DataLoss, msg("time {time_90k} references invalid signal {signal}"));
bail!(
DataLoss,
msg("time {time_90k} references invalid signal {signal}")
);
};
s.days.adjust(prev_time..time_90k, 0, prev_state);
}

View File

@@ -107,7 +107,10 @@ pub fn run(args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
let Some(sample_file_path) = sample_file_path.to_str() else {
bail!(
InvalidArgument,
msg("sample file dir {} is not a valid string", sample_file_path.display()),
msg(
"sample file dir {} is not a valid string",
sample_file_path.display()
),
);
};
tx.execute(