Skip to content

Commit

Permalink
Minor clippy warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
victorporof committed Jul 20, 2020
1 parent e3c3388 commit d33e79f
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/bin/dump.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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(())
}
2 changes: 1 addition & 1 deletion src/bin/rand.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 0 additions & 2 deletions src/value.rs
Original file line number Diff line number Diff line change
Expand Up @@ -221,8 +221,6 @@ impl<'v> From<&'v OwnedValue> for Value<'v> {

#[cfg(test)]
mod tests {
use ordered_float::OrderedFloat;

use super::*;

#[test]
Expand Down
1 change: 1 addition & 0 deletions tests/integer-store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 2 additions & 0 deletions tests/manager.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>;

Expand All @@ -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>;

Expand Down
1 change: 1 addition & 0 deletions tests/multi-integer-store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit d33e79f

Please sign in to comment.