mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-29 23:14:34 +01:00
18 lines
468 B
Rust
18 lines
468 B
Rust
|
use syntax::Resources;
|
||
|
use util::{Ceiling, Ceilings};
|
||
|
|
||
|
pub fn resources(resources: &Resources, ceilings: &Ceilings) {
|
||
|
for resource in resources.keys() {
|
||
|
if let Some(ceiling) = ceilings.get(&resource) {
|
||
|
assert_ne!(
|
||
|
*ceiling,
|
||
|
Ceiling::Owned,
|
||
|
"{} should be local data",
|
||
|
resource
|
||
|
);
|
||
|
} else {
|
||
|
panic!("resource {} is unused", resource)
|
||
|
}
|
||
|
}
|
||
|
}
|