squash some warnings

This commit is contained in:
Niko Matsakis 2019-04-03 11:01:38 -03:00
parent 74294f71f3
commit dbc9d27d16

View file

@ -1,4 +1,3 @@
#[macro_use]
extern crate salsa;
use std::rc::Rc;
@ -9,11 +8,11 @@ trait NoSendSyncDatabase: salsa::Database {
fn no_send_sync_key(&self, key: Rc<bool>) -> bool;
}
fn no_send_sync_value(db: &impl NoSendSyncDatabase, key: bool) -> Rc<bool> {
fn no_send_sync_value(_db: &impl NoSendSyncDatabase, key: bool) -> Rc<bool> {
Rc::new(key)
}
fn no_send_sync_key(db: &impl NoSendSyncDatabase, key: Rc<bool>) -> bool {
fn no_send_sync_key(_db: &impl NoSendSyncDatabase, key: Rc<bool>) -> bool {
*key
}
@ -31,7 +30,7 @@ impl salsa::Database for DatabaseImpl {
#[test]
fn no_send_sync() {
let mut db = DatabaseImpl::default();
let db = DatabaseImpl::default();
assert_eq!(db.no_send_sync_value(true), Rc::new(true));
assert_eq!(db.no_send_sync_key(Rc::new(false)), false);