rustfmt everything

I want to make the project more accessible by not expecting folks to
match my idiosyncratic style. Now almost [1] everything is written
in the "standard" style. CI enforces this.

[1] "Almost": I used #[rustfmt::skip] in a few sections where I felt
aligning things in columns significantly improves readability.
This commit is contained in:
Scott Lamb
2021-02-16 22:15:54 -08:00
parent 64f8d38e01
commit 97678f42e4
47 changed files with 6541 additions and 3453 deletions

View File

@@ -29,12 +29,12 @@
// along with this program. If not, see <http://www.gnu.org/licenses/>.
/// Upgrades a version 3 schema to a version 4 schema.
use failure::Error;
pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error> {
// These create statements match the schema.sql when version 4 was the latest.
tx.execute_batch(r#"
tx.execute_batch(
r#"
alter table meta add column max_signal_changes integer check (max_signal_changes >= 0);
create table signal (
@@ -191,6 +191,7 @@ pub fn run(_args: &super::Args, tx: &rusqlite::Transaction) -> Result<(), Error>
-- This was supposed to be present in version 2, but the upgrade procedure used to miss it.
-- Catch up so we know a version 4 database is right.
create index if not exists user_session_uid on user_session (user_id);
"#)?;
"#,
)?;
Ok(())
}