File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed
Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change 1- use std:: path:: Path ;
1+ use std:: path:: { Path , PathBuf } ;
22
33use anyhow:: Result ;
44use clap:: Parser ;
@@ -18,7 +18,7 @@ struct Args {
1818 required = true ,
1919 help = "File path to scan. If a directory is specified, all contents will be scanned recursively."
2020 ) ]
21- base_path : String ,
21+ base_path : PathBuf ,
2222
2323 /// Number of times to greet
2424 #[ arg(
@@ -28,7 +28,7 @@ struct Args {
2828 default_value = "./musql.db3" ,
2929 help = "Path for the SQLite database that will be written to. It will be created if it does not exist."
3030 ) ]
31- database_path : String ,
31+ database_path : PathBuf ,
3232}
3333
3434fn main ( ) -> Result < ( ) > {
@@ -39,7 +39,7 @@ fn main() -> Result<()> {
3939 musql ( & args. base_path , & args. database_path )
4040}
4141
42- fn musql ( base_path : & str , database_path : & str ) -> Result < ( ) > {
42+ fn musql ( base_path : & Path , database_path : & Path ) -> Result < ( ) > {
4343 info ! ( "Initializing database." ) ;
4444 let mut conn = Connection :: open ( database_path) ?;
4545 sql:: init_schema ( & conn) ?;
You can’t perform that action at this time.
0 commit comments