Allow unstable; rename uint

without.crypto
Dan Burkert 10 years ago
parent 0b202ecd56
commit 61035b625e
  1. 2
      src/cursor.rs
  2. 1
      src/lib.rs
  3. 10
      src/transaction.rs

@ -218,7 +218,7 @@ unsafe fn slice_to_val(slice: Option<&[u8]>) -> ffi::MDB_val {
unsafe fn val_to_slice<'a>(val: ffi::MDB_val) -> &'a [u8] {
mem::transmute(raw::Slice {
data: val.mv_data as *const u8,
len: val.mv_size as uint
len: val.mv_size as usize
})
}

@ -5,6 +5,7 @@
//! general, the API is very similar to the LMDB [C-API](http://symas.com/mdb/doc/).
#![feature(unsafe_destructor)]
#![allow(unstable)]
#[macro_use] extern crate log;
extern crate libc;

@ -80,7 +80,7 @@ pub trait TransactionExt<'env> : Transaction<'env> + Sized {
ffi::MDB_SUCCESS => {
Ok(mem::transmute(raw::Slice {
data: data_val.mv_data as *const u8,
len: data_val.mv_size as uint
len: data_val.mv_size as usize
}))
},
err_code => Err(LmdbError::from_err_code(err_code)),
@ -317,7 +317,7 @@ impl <'env> RwTransaction<'env> {
let slice: &'txn mut [u8] =
mem::transmute(raw::Slice {
data: data_val.mv_data as *const u8,
len: data_val.mv_size as uint
len: data_val.mv_size as usize
});
Ok(BufWriter::new(slice))
}
@ -534,7 +534,7 @@ mod test {
let dir = io::TempDir::new("test").unwrap();
let env: Arc<Environment> = Arc::new(Environment::new().open(dir.path(), io::USER_RWX).unwrap());
let n = 10u; // Number of concurrent readers
let n = 10us; // Number of concurrent readers
let barrier = Arc::new(Barrier::new(n + 1));
let mut futures: Vec<Future<bool>> = Vec::with_capacity(n);
@ -576,7 +576,7 @@ mod test {
let dir = io::TempDir::new("test").unwrap();
let env = Arc::new(Environment::new().open(dir.path(), io::USER_RWX).unwrap());
let n = 10u; // Number of concurrent writers
let n = 10us; // Number of concurrent writers
let mut futures: Vec<Future<bool>> = Vec::with_capacity(n);
let key = "key";
@ -620,7 +620,7 @@ mod test {
XorShiftRng::new_unseeded().shuffle(keys.as_mut_slice());
b.iter(|| {
let mut i = 0u;
let mut i = 0us;
for key in keys.iter() {
i = i + txn.get(db, key.as_bytes()).unwrap().len();
}

Loading…
Cancel
Save