mirror of
https://github.com/salsa-rs/salsa.git
synced 2024-12-24 12:58:37 +00:00
squash some warnings
This commit is contained in:
parent
74294f71f3
commit
dbc9d27d16
1 changed files with 3 additions and 4 deletions
|
@ -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);
|
||||
|
|
Loading…
Reference in a new issue