Minor clippy warning fixes

without.crypto
Victor Porof 4 years ago
parent e3c3388e66
commit d33e79fcd1
  1. 2
      src/bin/dump.rs
  2. 2
      src/bin/rand.rs
  3. 2
      src/value.rs
  4. 1
      tests/integer-store.rs
  5. 2
      tests/manager.rs
  6. 1
      tests/multi-integer-store.rs

@ -44,7 +44,7 @@ fn main() -> Result<(), MigrateError> {
let env_path = env_path.ok_or("must provide a path to the LMDB environment")?;
let mut migrator: Migrator = Migrator::new(Path::new(&env_path))?;
migrator.dump(db_name.as_ref().map(String::as_str), io::stdout()).unwrap();
migrator.dump(db_name.as_deref(), io::stdout()).unwrap();
Ok(())
}

@ -78,7 +78,7 @@ fn main() {
// of the pairs (assuming maximum key and value sizes).
builder.set_map_size((511 + 65535) * num_pairs * 2);
let rkv = Rkv::from_builder(Path::new(&path), builder).expect("Rkv");
let store = rkv.open_single(database.as_ref().map(|x| x.as_str()), StoreOptions::create()).expect("opened");
let store = rkv.open_single(database.as_deref(), StoreOptions::create()).expect("opened");
let mut writer = rkv.write().expect("writer");
// Generate random values for the number of keys and key/value lengths.

@ -221,8 +221,6 @@ impl<'v> From<&'v OwnedValue> for Value<'v> {
#[cfg(test)]
mod tests {
use ordered_float::OrderedFloat;
use super::*;
#[test]

@ -8,6 +8,7 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
#![cfg(feature = "db-int-key")]
#![allow(clippy::many_single_char_names)]
use std::fs;

@ -23,6 +23,7 @@ use rkv::Rkv;
/// Test that a manager can be created with simple type inference.
#[test]
#[allow(clippy::let_underscore_lock)]
fn test_simple() {
type Manager = rkv::Manager<LmdbEnvironment>;
@ -31,6 +32,7 @@ fn test_simple() {
/// Test that a manager can be created with simple type inference.
#[test]
#[allow(clippy::let_underscore_lock)]
fn test_simple_safe() {
type Manager = rkv::Manager<SafeModeEnvironment>;

@ -8,6 +8,7 @@
// CONDITIONS OF ANY KIND, either express or implied. See the License for the
// specific language governing permissions and limitations under the License.
#![cfg(all(feature = "db-dup-sort", feature = "db-int-key"))]
#![allow(clippy::many_single_char_names)]
use std::fs;

Loading…
Cancel
Save