Skip to content
This repository has been archived by the owner on Jul 11, 2021. It is now read-only.

Commit

Permalink
clean code for release
Browse files Browse the repository at this point in the history
  • Loading branch information
siscia committed May 10, 2017
1 parent a927420 commit e75735f
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 22 deletions.
11 changes: 0 additions & 11 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,17 +12,6 @@ use std::sync::mpsc::channel;

use uuid::Uuid;

/*
#[allow(dead_code)]
#[allow(non_snake_case)]
#[allow(non_camel_case_types)]
#[allow(non_upper_case_globals)]
#[allow(improper_ctypes)]
mod ffi {
include!(concat!(env!("OUT_DIR"), "/bindings_redis.rs"));
}
*/

mod sqlite;
use sqlite as sql;

Expand Down
9 changes: 0 additions & 9 deletions src/redis.rs
Original file line number Diff line number Diff line change
Expand Up @@ -322,8 +322,6 @@ pub fn write_file_to_rdb(f: File,
let lenght = f.metadata().unwrap().len();
let blocks = lenght / block_size as u64;

println!("Dimension file: {}\n Blocks: {}", lenght, blocks);

unsafe {
ffi::RedisModule_SaveSigned.unwrap()(rdb, blocks as i64);
}
Expand All @@ -337,7 +335,6 @@ pub fn write_file_to_rdb(f: File,
return Ok(());
}
Ok(n) => unsafe {
println!("Number of bytes written: {}", n);
ffi::RedisModule_SaveStringBuffer.unwrap()(rdb,
tw.as_slice().as_ptr() as *const i8,
n)
Expand Down Expand Up @@ -370,7 +367,6 @@ pub fn write_rdb_to_file(f: &mut File,

for _ in 0..blocks {
let mut dimension: libc::size_t = 0;
println!("About to load the string");
let c_str_ptr = SafeRedisModuleString {
ptr:
unsafe {
Expand All @@ -379,7 +375,6 @@ pub fn write_rdb_to_file(f: &mut File,
},
};

println!("Dimension: {}", dimension);
if dimension == 0 {
break;
}
Expand All @@ -389,10 +384,6 @@ pub fn write_rdb_to_file(f: &mut File,
dimension,
dimension)
};
println!("Buffer dimension: {}, {:?}",
buffer.len(),
c_str_ptr.ptr);

let y = f.write_all(buffer.as_slice());
::mem::forget(buffer);
match y {
Expand Down
2 changes: 0 additions & 2 deletions src/sqlite.rs
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,6 @@ pub struct Statement {

impl Drop for Statement {
fn drop(&mut self) {
let sql = unsafe { CStr::from_ptr(ffi::sqlite3_sql(self.stmt)) };
println!("DROPPED STATETMENT: {:?}", sql);
unsafe {
ffi::sqlite3_finalize(self.stmt);
}
Expand Down

0 comments on commit e75735f

Please sign in to comment.