Update deps & micro fix

This commit is contained in:
Shunsuke Shibayama 2023-01-26 11:47:30 +09:00
parent e464e8dc79
commit 36427cb647
4 changed files with 22 additions and 19 deletions

View file

@ -1402,7 +1402,10 @@ impl ASTConverter {
self.convert_ident("__import__".to_string(), stmt.location),
));
// from . import foo ==> import "./foo"
let cont = format!("\"{}\"", module.clone().unwrap_or(names[0].symbol.clone()));
let cont = format!(
"\"{}\"",
module.clone().unwrap_or_else(|| names[0].symbol.clone())
);
let mod_name = Expr::Lit(Literal::new(Token::new(
TokenKind::StrLit,
cont,