Run rustfmt

This commit is contained in:
Ivan Ukhov 2020-05-26 20:05:39 +02:00
parent d396509611
commit 84064daa9d
No known key found for this signature in database
GPG Key ID: 00F6548B9D0C1F0A

View File

@ -32,20 +32,21 @@ impl Connection {
path_to_cstr!(path.as_ref()).as_ptr(), path_to_cstr!(path.as_ref()).as_ptr(),
&mut raw, &mut raw,
flags.0, flags.0,
0 as *const _ ); 0 as *const _,
);
// Explicitly close the connection on error. // Explicitly close the connection on error.
// This is a quirk of the C API, where the database handle // This is a quirk of the C API, where the database handle
// (raw) is unconditionally allocated. // (raw) is unconditionally allocated.
match ret { match ret {
ffi::SQLITE_OK => {}, ffi::SQLITE_OK => {}
code => { code => {
ffi::sqlite3_close(raw); ffi::sqlite3_close(raw);
return Err(::Error { return Err(::Error {
code: Some(code as isize), code: Some(code as isize),
message: None message: None,
}); });
}, }
} }
} }
Ok(Connection { Ok(Connection {