mirror of
https://github.com/rtic-rs/rtic.git
synced 2024-11-24 12:42:52 +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)
|
||
|
}
|
||
|
}
|
||
|
}
|