summaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
Diffstat (limited to 'core')
-rw-r--r--core/examples/http_bench.rs15
-rw-r--r--core/flags.rs3
-rw-r--r--core/isolate.rs3
-rw-r--r--core/js_errors.rs6
-rw-r--r--core/modules.rs3
5 files changed, 20 insertions, 10 deletions
diff --git a/core/examples/http_bench.rs b/core/examples/http_bench.rs
index 98f11bc4d..73a4720c2 100644
--- a/core/examples/http_bench.rs
+++ b/core/examples/http_bench.rs
@@ -149,11 +149,13 @@ fn dispatch(control: &[u8], zero_copy_buf: Option<PinnedBuf>) -> CoreOp {
.and_then(move |result| {
record_a.result = result;
Ok(record_a)
- }).or_else(|err| -> Result<Record, ()> {
+ })
+ .or_else(|err| -> Result<Record, ()> {
eprintln!("unexpected err {}", err);
record_b.result = -1;
Ok(record_b)
- }).then(|result| -> Result<Buf, ()> {
+ })
+ .then(|result| -> Result<Buf, ()> {
let record = result.unwrap();
Ok(record.into())
}),
@@ -234,7 +236,8 @@ fn op_accept(listener_rid: i32) -> Box<HttpBenchOp> {
Some(Repr::TcpListener(ref mut listener)) => listener.poll_accept(),
_ => panic!("bad rid {}", listener_rid),
}
- }).and_then(move |(stream, addr)| {
+ })
+ .and_then(move |(stream, addr)| {
debug!("accept success {}", addr);
let rid = new_rid();
@@ -283,7 +286,8 @@ fn op_read(rid: i32, zero_copy_buf: Option<PinnedBuf>) -> Box<HttpBenchOp> {
}
_ => panic!("bad rid"),
}
- }).and_then(move |nread| {
+ })
+ .and_then(move |nread| {
debug!("read success {}", nread);
Ok(nread as i32)
}),
@@ -303,7 +307,8 @@ fn op_write(rid: i32, zero_copy_buf: Option<PinnedBuf>) -> Box<HttpBenchOp> {
}
_ => panic!("bad rid"),
}
- }).and_then(move |nwritten| {
+ })
+ .and_then(move |nwritten| {
debug!("write success {}", nwritten);
Ok(nwritten as i32)
}),
diff --git a/core/flags.rs b/core/flags.rs
index 4deca6e2d..e1429ab9a 100644
--- a/core/flags.rs
+++ b/core/flags.rs
@@ -39,5 +39,6 @@ pub fn v8_set_flags(args: Vec<String>) -> Vec<String> {
let cstr = CStr::from_ptr(*ptr as *const c_char);
let slice = cstr.to_str().unwrap();
slice.to_string()
- }).collect()
+ })
+ .collect()
}
diff --git a/core/isolate.rs b/core/isolate.rs
index 8ad8ef8b2..5df5b4d3c 100644
--- a/core/isolate.rs
+++ b/core/isolate.rs
@@ -792,7 +792,8 @@ pub mod tests {
let control = new Uint8Array([42]);
Deno.core.send(control);
"#,
- ).unwrap();
+ )
+ .unwrap();
assert_eq!(dispatch_count.load(Ordering::Relaxed), 0);
let imports = isolate.mod_get_imports(mod_a);
diff --git a/core/js_errors.rs b/core/js_errors.rs
index 08cb00a72..3656242e0 100644
--- a/core/js_errors.rs
+++ b/core/js_errors.rs
@@ -310,7 +310,8 @@ mod tests {
"isConstructor":false,
"isWasm":false
}"#,
- ).unwrap();
+ )
+ .unwrap();
let r = StackFrame::from_json_value(&v);
assert_eq!(
r,
@@ -334,7 +335,8 @@ mod tests {
"line": 2,
"column": 11
}"#,
- ).unwrap();
+ )
+ .unwrap();
let r = StackFrame::from_json_value(&v);
assert!(r.is_some());
let f = r.unwrap();
diff --git a/core/modules.rs b/core/modules.rs
index 4b0d128f2..ea47b316e 100644
--- a/core/modules.rs
+++ b/core/modules.rs
@@ -384,7 +384,8 @@ impl Modules {
if !i.has_child(&child_name) {
i.children.push(child_name.to_string());
}
- }).is_some()
+ })
+ .is_some()
}
pub fn register(&mut self, id: deno_mod, name: &str) {