Skip to content

Commit 20dc622

Browse files
author
Huo Linhe
committed
style: cargo fmt
1 parent 9664f93 commit 20dc622

File tree

3 files changed

+13
-13
lines changed

3 files changed

+13
-13
lines changed

src/config.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -170,8 +170,8 @@ mod tests {
170170
#[test]
171171
fn disable_auto_commit() {
172172
let _ = UnQLite::create_temp()
173-
.max_page_cache(4096u32)
174-
.disable_auto_commit();
173+
.max_page_cache(4096u32)
174+
.disable_auto_commit();
175175
}
176176
#[test]
177177
#[should_panic]

src/kv_cursor.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -366,7 +366,7 @@ mod tests {
366366

367367
#[no_mangle]
368368
#[allow(private_no_mangle_fns)]
369-
pub extern fn print_data(ptr: *const c_void, _len: u32, _data: *mut c_void) -> i32 {
369+
pub extern "C" fn print_data(ptr: *const c_void, _len: u32, _data: *mut c_void) -> i32 {
370370
println!("Key callback: {:?}", ptr);
371371
0
372372
}

src/openmode.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ use ffi::constants;
22
#[derive(Clone, Copy, Debug, PartialEq, Eq)]
33
pub enum OpenMode {
44
ReadOnly,
5-
//ReadWrite,
5+
// ReadWrite,
66
Create,
7-
//Exclusive,
7+
// Exclusive,
88
TempDB,
9-
//NoMutex,
10-
//OmitJournaling,
11-
//InMemory,
9+
// NoMutex,
10+
// OmitJournaling,
11+
// InMemory,
1212
MMap,
1313
}
1414

@@ -18,13 +18,13 @@ impl Into<u32> for OpenMode {
1818
fn into(self) -> u32 {
1919
match self {
2020
ReadOnly => constants::UNQLITE_OPEN_READONLY,
21-
//ReadWrite => constants::UNQLITE_OPEN_READWRITE,
21+
// ReadWrite => constants::UNQLITE_OPEN_READWRITE,
2222
Create => constants::UNQLITE_OPEN_CREATE,
23-
//Exclusive => constants::UNQLITE_OPEN_EXCLUSIVE,
23+
// Exclusive => constants::UNQLITE_OPEN_EXCLUSIVE,
2424
TempDB => constants::UNQLITE_OPEN_TEMP_DB,
25-
//NoMutex => constants::UNQLITE_OPEN_NOMUTEX,
26-
//OmitJournaling => constants::UNQLITE_OPEN_OMIT_JOURNALING,
27-
//InMemory => constants::UNQLITE_OPEN_IN_MEMORY,
25+
// NoMutex => constants::UNQLITE_OPEN_NOMUTEX,
26+
// OmitJournaling => constants::UNQLITE_OPEN_OMIT_JOURNALING,
27+
// InMemory => constants::UNQLITE_OPEN_IN_MEMORY,
2828
MMap => constants::UNQLITE_OPEN_MMAP | constants::UNQLITE_OPEN_READONLY,
2929
}
3030
}

0 commit comments

Comments
 (0)