Rename SqliteResult -> Result.

This commit is contained in:
John Gallagher
2015-12-12 14:06:03 -05:00
parent f0b6bf9152
commit eb60bb3111
10 changed files with 171 additions and 164 deletions

View File

@@ -8,7 +8,7 @@ use std::str;
use std::time::Duration;
use super::ffi;
use {Error, SqliteResult, Connection};
use {Error, Result, Connection};
/// Set up the process-wide SQLite error logging callback.
/// This function is marked unsafe for two reasons:
@@ -21,7 +21,7 @@ use {Error, SqliteResult, Connection};
/// * It must be threadsafe if SQLite is used in a multithreaded way.
///
/// cf [The Error And Warning Log](http://sqlite.org/errlog.html).
pub unsafe fn config_log(callback: Option<fn(c_int, &str)>) -> SqliteResult<()> {
pub unsafe fn config_log(callback: Option<fn(c_int, &str)>) -> Result<()> {
extern "C" fn log_callback(p_arg: *mut c_void, err: c_int, msg: *const c_char) {
let c_slice = unsafe { CStr::from_ptr(msg).to_bytes() };
let callback: fn(c_int, &str) = unsafe { mem::transmute(p_arg) };