sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rs

This commit is contained in:
John Gallagher 2015-01-05 10:59:55 -05:00
parent 52aeb19246
commit 5902b9106c
4 changed files with 28 additions and 28 deletions

View File

@ -2,7 +2,7 @@
/* Running `target/bindgen /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.0/include` */ /* Running `target/bindgen /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS.sdk/usr/include/sqlite3.h -I/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/lib/clang/6.0/include` */
/* automatically generated by rust-bindgen */ /* automatically generated by rust-bindgen */
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3 { } pub enum Struct_sqlite3 { }
pub type sqlite3 = Struct_sqlite3; pub type sqlite3 = Struct_sqlite3;
pub type sqlite_int64 = ::libc::c_longlong; pub type sqlite_int64 = ::libc::c_longlong;
@ -17,13 +17,13 @@ pub type sqlite3_callback =
-> ::libc::c_int>; -> ::libc::c_int>;
pub type sqlite3_file = Struct_sqlite3_file; pub type sqlite3_file = Struct_sqlite3_file;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_file { pub struct Struct_sqlite3_file {
pub pMethods: *const Struct_sqlite3_io_methods, pub pMethods: *const Struct_sqlite3_io_methods,
} }
pub type sqlite3_io_methods = Struct_sqlite3_io_methods; pub type sqlite3_io_methods = Struct_sqlite3_io_methods;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_io_methods { pub struct Struct_sqlite3_io_methods {
pub iVersion: ::libc::c_int, pub iVersion: ::libc::c_int,
pub xClose: ::std::option::Option<extern "C" fn(arg1: *mut sqlite3_file) pub xClose: ::std::option::Option<extern "C" fn(arg1: *mut sqlite3_file)
@ -98,13 +98,13 @@ pub struct Struct_sqlite3_io_methods {
deleteFlag: ::libc::c_int) deleteFlag: ::libc::c_int)
-> ::libc::c_int>, -> ::libc::c_int>,
} }
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_mutex { } pub enum Struct_sqlite3_mutex { }
pub type sqlite3_mutex = Struct_sqlite3_mutex; pub type sqlite3_mutex = Struct_sqlite3_mutex;
pub type sqlite3_vfs = Struct_sqlite3_vfs; pub type sqlite3_vfs = Struct_sqlite3_vfs;
pub type sqlite3_syscall_ptr = ::std::option::Option<extern "C" fn()>; pub type sqlite3_syscall_ptr = ::std::option::Option<extern "C" fn()>;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_vfs { pub struct Struct_sqlite3_vfs {
pub iVersion: ::libc::c_int, pub iVersion: ::libc::c_int,
pub szOsFile: ::libc::c_int, pub szOsFile: ::libc::c_int,
@ -197,7 +197,7 @@ pub struct Struct_sqlite3_vfs {
} }
pub type sqlite3_mem_methods = Struct_sqlite3_mem_methods; pub type sqlite3_mem_methods = Struct_sqlite3_mem_methods;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_mem_methods { pub struct Struct_sqlite3_mem_methods {
pub xMalloc: ::std::option::Option<extern "C" fn(arg1: ::libc::c_int) pub xMalloc: ::std::option::Option<extern "C" fn(arg1: ::libc::c_int)
-> *mut ::libc::c_void>, -> *mut ::libc::c_void>,
@ -217,13 +217,13 @@ pub struct Struct_sqlite3_mem_methods {
(arg1: *mut ::libc::c_void)>, (arg1: *mut ::libc::c_void)>,
pub pAppData: *mut ::libc::c_void, pub pAppData: *mut ::libc::c_void,
} }
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_stmt { } pub enum Struct_sqlite3_stmt { }
pub type sqlite3_stmt = Struct_sqlite3_stmt; pub type sqlite3_stmt = Struct_sqlite3_stmt;
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_Mem { } pub enum Struct_Mem { }
pub type sqlite3_value = Struct_Mem; pub type sqlite3_value = Struct_Mem;
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_context { } pub enum Struct_sqlite3_context { }
pub type sqlite3_context = Struct_sqlite3_context; pub type sqlite3_context = Struct_sqlite3_context;
pub type sqlite3_destructor_type = pub type sqlite3_destructor_type =
@ -233,7 +233,7 @@ pub type sqlite3_index_info = Struct_sqlite3_index_info;
pub type sqlite3_vtab_cursor = Struct_sqlite3_vtab_cursor; pub type sqlite3_vtab_cursor = Struct_sqlite3_vtab_cursor;
pub type sqlite3_module = Struct_sqlite3_module; pub type sqlite3_module = Struct_sqlite3_module;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_module { pub struct Struct_sqlite3_module {
pub iVersion: ::libc::c_int, pub iVersion: ::libc::c_int,
pub xCreate: ::std::option::Option<extern "C" fn pub xCreate: ::std::option::Option<extern "C" fn
@ -343,7 +343,7 @@ pub struct Struct_sqlite3_module {
-> ::libc::c_int>, -> ::libc::c_int>,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_index_info { pub struct Struct_sqlite3_index_info {
pub nConstraint: ::libc::c_int, pub nConstraint: ::libc::c_int,
pub aConstraint: *mut Struct_sqlite3_index_constraint, pub aConstraint: *mut Struct_sqlite3_index_constraint,
@ -357,7 +357,7 @@ pub struct Struct_sqlite3_index_info {
pub estimatedCost: ::libc::c_double, pub estimatedCost: ::libc::c_double,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_index_constraint { pub struct Struct_sqlite3_index_constraint {
pub iColumn: ::libc::c_int, pub iColumn: ::libc::c_int,
pub op: ::libc::c_uchar, pub op: ::libc::c_uchar,
@ -365,35 +365,35 @@ pub struct Struct_sqlite3_index_constraint {
pub iTermOffset: ::libc::c_int, pub iTermOffset: ::libc::c_int,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_index_orderby { pub struct Struct_sqlite3_index_orderby {
pub iColumn: ::libc::c_int, pub iColumn: ::libc::c_int,
pub desc: ::libc::c_uchar, pub desc: ::libc::c_uchar,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_index_constraint_usage { pub struct Struct_sqlite3_index_constraint_usage {
pub argvIndex: ::libc::c_int, pub argvIndex: ::libc::c_int,
pub omit: ::libc::c_uchar, pub omit: ::libc::c_uchar,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_vtab { pub struct Struct_sqlite3_vtab {
pub pModule: *const sqlite3_module, pub pModule: *const sqlite3_module,
pub nRef: ::libc::c_int, pub nRef: ::libc::c_int,
pub zErrMsg: *mut ::libc::c_char, pub zErrMsg: *mut ::libc::c_char,
} }
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_vtab_cursor { pub struct Struct_sqlite3_vtab_cursor {
pub pVtab: *mut sqlite3_vtab, pub pVtab: *mut sqlite3_vtab,
} }
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_blob { } pub enum Struct_sqlite3_blob { }
pub type sqlite3_blob = Struct_sqlite3_blob; pub type sqlite3_blob = Struct_sqlite3_blob;
pub type sqlite3_mutex_methods = Struct_sqlite3_mutex_methods; pub type sqlite3_mutex_methods = Struct_sqlite3_mutex_methods;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_mutex_methods { pub struct Struct_sqlite3_mutex_methods {
pub xMutexInit: ::std::option::Option<extern "C" fn() -> ::libc::c_int>, pub xMutexInit: ::std::option::Option<extern "C" fn() -> ::libc::c_int>,
pub xMutexEnd: ::std::option::Option<extern "C" fn() -> ::libc::c_int>, pub xMutexEnd: ::std::option::Option<extern "C" fn() -> ::libc::c_int>,
@ -415,19 +415,19 @@ pub struct Struct_sqlite3_mutex_methods {
(arg1: *mut sqlite3_mutex) (arg1: *mut sqlite3_mutex)
-> ::libc::c_int>, -> ::libc::c_int>,
} }
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_pcache { } pub enum Struct_sqlite3_pcache { }
pub type sqlite3_pcache = Struct_sqlite3_pcache; pub type sqlite3_pcache = Struct_sqlite3_pcache;
pub type sqlite3_pcache_page = Struct_sqlite3_pcache_page; pub type sqlite3_pcache_page = Struct_sqlite3_pcache_page;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_pcache_page { pub struct Struct_sqlite3_pcache_page {
pub pBuf: *mut ::libc::c_void, pub pBuf: *mut ::libc::c_void,
pub pExtra: *mut ::libc::c_void, pub pExtra: *mut ::libc::c_void,
} }
pub type sqlite3_pcache_methods2 = Struct_sqlite3_pcache_methods2; pub type sqlite3_pcache_methods2 = Struct_sqlite3_pcache_methods2;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_pcache_methods2 { pub struct Struct_sqlite3_pcache_methods2 {
pub iVersion: ::libc::c_int, pub iVersion: ::libc::c_int,
pub pArg: *mut ::libc::c_void, pub pArg: *mut ::libc::c_void,
@ -470,7 +470,7 @@ pub struct Struct_sqlite3_pcache_methods2 {
} }
pub type sqlite3_pcache_methods = Struct_sqlite3_pcache_methods; pub type sqlite3_pcache_methods = Struct_sqlite3_pcache_methods;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_pcache_methods { pub struct Struct_sqlite3_pcache_methods {
pub pArg: *mut ::libc::c_void, pub pArg: *mut ::libc::c_void,
pub xInit: ::std::option::Option<extern "C" fn(arg1: *mut ::libc::c_void) pub xInit: ::std::option::Option<extern "C" fn(arg1: *mut ::libc::c_void)
@ -507,12 +507,12 @@ pub struct Struct_sqlite3_pcache_methods {
pub xDestroy: ::std::option::Option<extern "C" fn pub xDestroy: ::std::option::Option<extern "C" fn
(arg1: *mut sqlite3_pcache)>, (arg1: *mut sqlite3_pcache)>,
} }
#[deriving(Copy)] #[derive(Copy)]
pub enum Struct_sqlite3_backup { } pub enum Struct_sqlite3_backup { }
pub type sqlite3_backup = Struct_sqlite3_backup; pub type sqlite3_backup = Struct_sqlite3_backup;
pub type sqlite3_rtree_geometry = Struct_sqlite3_rtree_geometry; pub type sqlite3_rtree_geometry = Struct_sqlite3_rtree_geometry;
#[repr(C)] #[repr(C)]
#[deriving(Copy)] #[derive(Copy)]
pub struct Struct_sqlite3_rtree_geometry { pub struct Struct_sqlite3_rtree_geometry {
pub pContext: *mut ::libc::c_void, pub pContext: *mut ::libc::c_void,
pub nParam: ::libc::c_int, pub nParam: ::libc::c_int,

View File

@ -8,7 +8,7 @@
//! use time::Timespec; //! use time::Timespec;
//! use rusqlite::SqliteConnection; //! use rusqlite::SqliteConnection;
//! //!
//! #[deriving(Show)] //! #[derive(Show)]
//! struct Person { //! struct Person {
//! id: i32, //! id: i32,
//! name: String, //! name: String,
@ -84,7 +84,7 @@ unsafe fn errmsg_to_string(errmsg: *const c_char) -> String {
} }
/// Encompasses an error result from a call to the SQLite C API. /// Encompasses an error result from a call to the SQLite C API.
#[deriving(Show)] #[derive(Show)]
pub struct SqliteError { pub struct SqliteError {
/// The error code returned by a SQLite C API call. See [SQLite Result /// The error code returned by a SQLite C API call. See [SQLite Result
/// Codes](http://www.sqlite.org/rescode.html) for details. /// Codes](http://www.sqlite.org/rescode.html) for details.

View File

@ -7,7 +7,7 @@ pub use SqliteTransactionBehavior::{
/// Options for transaction behavior. See [BEGIN /// Options for transaction behavior. See [BEGIN
/// TRANSACTION](http://www.sqlite.org/lang_transaction.html) for details. /// TRANSACTION](http://www.sqlite.org/lang_transaction.html) for details.
#[deriving(Copy)] #[derive(Copy)]
pub enum SqliteTransactionBehavior { pub enum SqliteTransactionBehavior {
SqliteTransactionDeferred, SqliteTransactionDeferred,
SqliteTransactionImmediate, SqliteTransactionImmediate,

View File

@ -141,7 +141,7 @@ impl<T: ToSql> ToSql for Option<T> {
/// conn.execute("INSERT INTO people (name) VALUES (?)", &[&Null]) /// conn.execute("INSERT INTO people (name) VALUES (?)", &[&Null])
/// } /// }
/// ``` /// ```
#[deriving(Copy)] #[derive(Copy)]
pub struct Null; pub struct Null;
impl ToSql for Null { impl ToSql for Null {