git.delta.rocks / jrsonnet / refs/commits / e65c4a73f990

difftreelog

fix make `async_imports` compile again

Petr Portnov2023-10-29parent: #9ead896.patch.diff
in: master

1 file changed

modifiedcrates/jrsonnet-evaluator/src/async_import.rsdiffbeforeafterboth
9 SourcePath,9 SourcePath,
10};10};
1111
12use crate::{gc::GcHashMap, throw, FileData, ImportResolver, State};12use crate::{bail, gc::GcHashMap, FileData, ImportResolver, State};
1313
14pub struct Import {14pub struct Import {
15 path: IStr,15 path: IStr,
179 find_imports(expr, out);179 find_imports(expr, out);
180 in_args(args, out);180 in_args(args, out);
181 }181 }
182 Expr::Index(expr, index) => {182 Expr::Index { indexable, parts } => {
183 find_imports(expr, out);183 find_imports(indexable, out);
184 for part in parts {
184 find_imports(index, out);185 find_imports(&part.value, out);
186 }
185 }187 }
186 Expr::Function(params, expr) => {188 Expr::Function(params, expr) => {
187 in_params(params, out);189 in_params(params, out);
262 }264 }
263265
264 fn resolve(&self, path: &Path) -> crate::Result<SourcePath> {266 fn resolve(&self, path: &Path) -> crate::Result<SourcePath> {
265 throw!(crate::error::ErrorKind::AbsoluteImportNotSupported(267 bail!(crate::error::ErrorKind::AbsoluteImportNotSupported(
266 path.to_owned()268 path.to_owned()
267 ))269 ))
268 }270 }