Make dc_open arguments rusty

This commit is contained in:
Alexander Krotov
2019-07-29 03:04:59 +03:00
parent c34e66adb6
commit 2d5b04148f
8 changed files with 41 additions and 62 deletions

View File

@@ -76,11 +76,11 @@ fn main() {
});
let dir = tempdir().unwrap();
let dbfile = CString::new(dir.path().join("db.sqlite").to_str().unwrap()).unwrap();
let dbfile = dir.path().join("db.sqlite");
println!("opening database {:?}", dbfile);
assert_eq!(dc_open(&ctx, dbfile.as_ptr(), std::ptr::null()), 1);
assert!(dc_open(&ctx, dbfile.to_str().unwrap(), None));
println!("configuring");
let args = std::env::args().collect::<Vec<String>>();