File tree Expand file tree Collapse file tree 1 file changed +7
-26
lines changed
crates/compilers/src/resolver Expand file tree Collapse file tree 1 file changed +7
-26
lines changed Original file line number Diff line number Diff line change @@ -401,38 +401,19 @@ impl<L: Language, D: ParsedSource<Language = L>> Graph<D> {
401401 } ;
402402
403403 for import_path in node. data . resolve_imports ( paths, & mut resolved_solc_include_paths) ? {
404- match paths. resolve_import_and_include_paths (
404+ if let Some ( err ) = match paths. resolve_import_and_include_paths (
405405 cwd,
406406 & import_path,
407407 & mut resolved_solc_include_paths,
408408 ) {
409409 Ok ( import) => {
410- add_node ( & mut unresolved, & mut index, & mut resolved_imports, import)
411- . map_err ( |err| {
412- match err {
413- SolcError :: ResolveCaseSensitiveFileName { .. }
414- | SolcError :: Resolve ( _) => {
415- // make the error more helpful by providing additional
416- // context
417- SolcError :: FailedResolveImport (
418- Box :: new ( err) ,
419- node. path . clone ( ) ,
420- import_path. clone ( ) ,
421- )
422- }
423- _ => err,
424- }
425- } ) ?
410+ add_node ( & mut unresolved, & mut index, & mut resolved_imports, import) . err ( )
426411 }
427- Err ( err) => {
428- unresolved_imports. insert ( ( import_path. to_path_buf ( ) , node. path . clone ( ) ) ) ;
429- trace ! (
430- "failed to resolve import component \" {:?}\" for {:?}" ,
431- err,
432- node. path
433- )
434- }
435- } ;
412+ Err ( err) => Some ( err) ,
413+ } {
414+ unresolved_imports. insert ( ( import_path. to_path_buf ( ) , node. path . clone ( ) ) ) ;
415+ trace ! ( "failed to resolve import component \" {:?}\" for {:?}" , err, node. path)
416+ }
436417 }
437418
438419 nodes. push ( node) ;
You can’t perform that action at this time.
0 commit comments