Browse Source

Run rustfmt 1.41 (#877)

pull/879/head
Sergei Pepyakin 5 years ago
committed by GitHub
parent
commit
eb183d7ab3
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
  1. 33
      crates/lightbeam/src/backend.rs
  2. 3
      src/commands/wasm2obj.rs

33
crates/lightbeam/src/backend.rs

@ -5589,25 +5589,26 @@ impl<'this, M: ModuleContext> Context<'this, M> {
}
if pending.len() == start_len {
let src =
match pending
.iter()
.filter_map(|(src, _)| {
if let ValueLocation::Reg(reg) = src {
Some(reg)
} else {
None
}
})
.next()
{
None => return Err(Error::Microwasm(
let src = match pending
.iter()
.filter_map(|(src, _)| {
if let ValueLocation::Reg(reg) = src {
Some(reg)
} else {
None
}
})
.next()
{
None => {
return Err(Error::Microwasm(
"Programmer error: We shouldn't need to push \
intermediate args if we don't have any argument sources in registers"
.to_string(),
)),
Some(val) => *val,
};
))
}
Some(val) => *val,
};
let new_src = self.push_physical(ValueLocation::Reg(src))?;
for (old_src, _) in pending.iter_mut() {
if *old_src == ValueLocation::Reg(src) {

3
src/commands/wasm2obj.rs

@ -23,8 +23,7 @@ use wasmtime_jit::native;
use wasmtime_obj::emit_module;
/// The after help text for the `wasm2obj` command.
pub const WASM2OBJ_AFTER_HELP: &str =
"The translation is dependent on the environment chosen.\n\
pub const WASM2OBJ_AFTER_HELP: &str = "The translation is dependent on the environment chosen.\n\
The default is a dummy environment that produces placeholder values.";
fn parse_target(s: &str) -> Result<Triple> {

Loading…
Cancel
Save