Unverified Commit 42a4d130 authored by qupeng's avatar qupeng Committed by GitHub

update rust toolchain (#607)

Signed-off-by: 's avatarqupeng <qupeng@pingcap.com>
parent 26f1cf59
......@@ -17,7 +17,7 @@ extern crate cmake;
use cc::Build;
use cmake::Config;
use std::path::PathBuf;
use std::path::{Path, PathBuf};
use std::{env, str};
// On these platforms jemalloc-sys will use a prefixed jemalloc which cannot be linked together
......@@ -27,7 +27,7 @@ const NO_JEMALLOC_TARGETS: &[&str] = &["android", "dragonfly", "musl", "darwin"]
// Generate the bindings to rocksdb C-API.
// Try to disable the generation of platform-related bindings.
fn bindgen_rocksdb(file_path: &PathBuf) {
fn bindgen_rocksdb(file_path: &Path) {
let bindings = bindgen::Builder::default()
.header("crocksdb/crocksdb/c.h")
.ctypes_prefix("libc")
......
nightly-2020-07-01
nightly-2021-01-25
......@@ -61,7 +61,7 @@ pub unsafe extern "C" fn full_merge_callback(
let buf = buf as *mut u8;
assert!(!buf.is_null());
*new_value_length = result.len() as size_t;
*success = 1 as u8;
*success = 1_u8;
ptr::copy(result.as_ptr(), &mut *buf, result.len());
buf as *const c_char
}
......@@ -86,7 +86,7 @@ pub unsafe extern "C" fn partial_merge_callback(
let buf = buf as *mut u8;
assert!(!buf.is_null());
*new_value_length = result.len() as size_t;
*success = 1 as u8;
*success = 1_u8;
ptr::copy(result.as_ptr(), &mut *buf, result.len());
buf as *const c_char
}
......
......@@ -84,10 +84,10 @@ fn ensure_default_cf_exists<'a>(
}
}
fn split_descriptors<'a>(
list: Vec<ColumnFamilyDescriptor<'a>>,
fn split_descriptors(
list: Vec<ColumnFamilyDescriptor>,
is_titan: bool,
) -> (Vec<&'a str>, Vec<ColumnFamilyOptions>) {
) -> (Vec<&str>, Vec<ColumnFamilyOptions>) {
let mut v1 = Vec::with_capacity(list.len());
let mut v2 = Vec::with_capacity(list.len());
for mut d in list {
......@@ -345,7 +345,6 @@ impl<D> DBIterator<D> {
#[deprecated]
pub type Kv = (Vec<u8>, Vec<u8>);
#[deprecated]
impl<'b, D> Iterator for &'b mut DBIterator<D> {
#[allow(deprecated)]
type Item = Kv;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment