Register a manifest at `dir`; nearer manifests win for bare-name resolution. */
(self, dir: &str, imports: &[(&str, &str)], extends: Option<&str>)
| 86 | |
| 87 | /* Register a manifest at `dir`; nearer manifests win for bare-name resolution. */ |
| 88 | pub fn with_manifest(self, dir: &str, imports: &[(&str, &str)], extends: Option<&str>) -> Self { |
| 89 | let imp = imports.iter().map(|(k, v)| (k.to_string(), v.to_string())).collect(); |
| 90 | let m = Manifest { imports: imp, extends: extends.map(|s| s.to_string()) }; |
| 91 | self.state.borrow_mut().manifests.insert(dir.to_string(), m); |
| 92 | self |
| 93 | } |
| 94 | } |
| 95 | |
| 96 | impl Resolver for TestResolver { |
no test coverage detected