mirror of
https://github.com/salsa-rs/salsa.git
synced 2025-01-22 21:05:11 +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;
|
extern crate salsa;
|
||||||
|
|
||||||
use std::rc::Rc;
|
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_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)
|
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
|
*key
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -31,7 +30,7 @@ impl salsa::Database for DatabaseImpl {
|
||||||
|
|
||||||
#[test]
|
#[test]
|
||||||
fn no_send_sync() {
|
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_value(true), Rc::new(true));
|
||||||
assert_eq!(db.no_send_sync_key(Rc::new(false)), false);
|
assert_eq!(db.no_send_sync_key(Rc::new(false)), false);
|
||||||
|
|
Loading…
Reference in a new issue