30c77f8d03
Make analysis resolve recipe dependencies from names (`Name`) to recipes (`Rc<Recipe>`), to give type-level certainty that resolution was performed correctly and remove the need to look up dependencies on run.
12 lines
199 B
Rust
12 lines
199 B
Rust
use crate::common::*;
|
|
|
|
pub(crate) trait Keyed<'key> {
|
|
fn key(&self) -> &'key str;
|
|
}
|
|
|
|
impl<'key, T: Keyed<'key>> Keyed<'key> for Rc<T> {
|
|
fn key(&self) -> &'key str {
|
|
self.as_ref().key()
|
|
}
|
|
}
|