mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-06-15 05:51:23 +00:00
Extract Rust2Js like Js2Rust was extracted
Along the way clean up a lot of the formatting of the auto-generated code to make it a bit prettier by default.
This commit is contained in:
@ -1,4 +1,4 @@
|
||||
use super::Context;
|
||||
use super::{indent, Context};
|
||||
use descriptor::{Descriptor, Function};
|
||||
|
||||
/// Helper struct for manfuacturing a shim in JS used to translate JS types to
|
||||
@ -305,13 +305,3 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
|
||||
ret
|
||||
}
|
||||
}
|
||||
|
||||
fn indent(s: &str) -> String {
|
||||
let mut ret = String::new();
|
||||
for line in s.lines() {
|
||||
ret.push_str(" ");
|
||||
ret.push_str(line);
|
||||
ret.push_str("\n");
|
||||
}
|
||||
return ret
|
||||
}
|
||||
|
Reference in New Issue
Block a user