diff options
| author | mo khan <mo@mokhan.ca> | 2025-06-11 15:12:59 -0600 |
|---|---|---|
| committer | mo khan <mo@mokhan.ca> | 2025-06-11 15:12:59 -0600 |
| commit | 4435ee26b79648e92d0f172e42f9e6629e955505 (patch) | |
| tree | 0720fd07c879a58672fcfcb2e45ed1161430f039 /src/bin/migrate.rs | |
| parent | 39c67cfc6c74bf4b26ba455f3adda1241aea35ea (diff) | |
chore: rustfmt and include Connection: header in responses
Diffstat (limited to 'src/bin/migrate.rs')
| -rw-r--r-- | src/bin/migrate.rs | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bin/migrate.rs b/src/bin/migrate.rs index 9afdbf0..9a0bab9 100644 --- a/src/bin/migrate.rs +++ b/src/bin/migrate.rs @@ -1,11 +1,11 @@ use anyhow::Result; use rusqlite::Connection; -use sts::{Config, MigrationRunner}; use std::env; +use sts::{Config, MigrationRunner}; fn main() -> Result<()> { let args: Vec<String> = env::args().collect(); - + if args.len() < 2 { print_usage(); return Ok(()); @@ -29,7 +29,8 @@ fn main() -> Result<()> { eprintln!("Usage: cargo run --bin migrate rollback <version>"); return Ok(()); } - let version: i32 = args[2].parse() + let version: i32 = args[2] + .parse() .map_err(|_| anyhow::anyhow!("Invalid version number: {}", args[2]))?; runner.rollback_to_version(version)?; } @@ -58,4 +59,4 @@ fn print_usage() { println!(" cargo run --bin migrate up"); println!(" cargo run --bin migrate status"); println!(" cargo run --bin migrate rollback 0"); -}
\ No newline at end of file +} |
