Run cargo fmt

This commit is contained in:
Alex Crichton
2019-04-16 10:52:27 -07:00
parent 5ebfa27b62
commit ff1addbbaa
12 changed files with 93 additions and 48 deletions

View File

@ -340,8 +340,10 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
Descriptor::Char => {
self.js_arguments
.push((name.clone(), "string | undefined".to_string()));
self.rust_arguments
.push(format!("isLikeNone({0}) ? 0xFFFFFF : {0}.codePointAt(0)", name));
self.rust_arguments.push(format!(
"isLikeNone({0}) ? 0xFFFFFF : {0}.codePointAt(0)",
name
));
}
Descriptor::Enum { hole } => {
self.js_arguments
@ -630,7 +632,8 @@ impl<'a, 'b> Js2Rust<'a, 'b> {
self.ret_expr = "
const ret = RET;
return ret === 0xFFFFFF ? undefined : String.fromCodePoint(ret);
".to_string();
"
.to_string();
return Ok(self);
}
Descriptor::Enum { hole } => {

View File

@ -215,8 +215,10 @@ impl<'a, 'b> Rust2Js<'a, 'b> {
return Ok(());
}
Descriptor::Char => {
self.js_arguments
.push(format!("{0} === 0xFFFFFF ? undefined : String.fromCodePoint({0})", abi));
self.js_arguments.push(format!(
"{0} === 0xFFFFFF ? undefined : String.fromCodePoint({0})",
abi
));
return Ok(());
}
Descriptor::RustStruct(ref class) => {