mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-20 16:26:33 +00:00
Rename namespace
to js_namespace
Along the way remove the namespace in Rust as this ended up causing too many problems, alas! The `js_namespace` attribute now almost exclusively modifies the JS bindings, hence the "js" in the name now.
This commit is contained in:
@ -1558,7 +1558,7 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
|
||||
fn import_name(&mut self, import: &shared::Import, item: &str) -> String {
|
||||
if let Some(ref module) = import.module {
|
||||
let name = import.namespace.as_ref().map(|s| &**s).unwrap_or(item);
|
||||
let name = import.js_namespace.as_ref().map(|s| &**s).unwrap_or(item);
|
||||
|
||||
if self.cx.imported_names.insert(name.to_string()) {
|
||||
self.cx.imports.push_str(&format!("
|
||||
@ -1566,7 +1566,7 @@ impl<'a, 'b> SubContext<'a, 'b> {
|
||||
", name, module));
|
||||
}
|
||||
}
|
||||
match import.namespace {
|
||||
match import.js_namespace {
|
||||
Some(ref s) => format!("{}.{}", s, item),
|
||||
None => item.to_string(),
|
||||
}
|
||||
|
Reference in New Issue
Block a user