Skip to content

Commit

Permalink
Format for some reason
Browse files Browse the repository at this point in the history
  • Loading branch information
nayeemrmn committed Feb 24, 2020
1 parent 8c57ad5 commit 5b46633
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 6 deletions.
14 changes: 10 additions & 4 deletions cli/ops/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -541,11 +541,14 @@ fn op_make_temp_dir(
) -> Result<JsonOp, OpError> {
let args: MakeTempArgs = serde_json::from_value(args)?;

let dir = args.dir.map(|s| deno_fs::resolve_from_cwd(Path::new(&s)).unwrap());
let dir = args
.dir
.map(|s| deno_fs::resolve_from_cwd(Path::new(&s)).unwrap());
let prefix = args.prefix.map(String::from);
let suffix = args.suffix.map(String::from);

state.check_write(dir.clone().unwrap_or_else(std::env::temp_dir).as_path())?;
state
.check_write(dir.clone().unwrap_or_else(std::env::temp_dir).as_path())?;

let is_sync = args.promise_id.is_none();
blocking_json(is_sync, move || {
Expand All @@ -572,11 +575,14 @@ fn op_make_temp_file(
) -> Result<JsonOp, OpError> {
let args: MakeTempArgs = serde_json::from_value(args)?;

let dir = args.dir.map(|s| deno_fs::resolve_from_cwd(Path::new(&s)).unwrap());
let dir = args
.dir
.map(|s| deno_fs::resolve_from_cwd(Path::new(&s)).unwrap());
let prefix = args.prefix.map(String::from);
let suffix = args.suffix.map(String::from);

state.check_write(dir.clone().unwrap_or_else(std::env::temp_dir).as_path())?;
state
.check_write(dir.clone().unwrap_or_else(std::env::temp_dir).as_path())?;

let is_sync = args.promise_id.is_none();
blocking_json(is_sync, move || {
Expand Down
4 changes: 2 additions & 2 deletions tools/hyper_hello/hyper_hello.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,8 @@ async fn main() -> Result<(), Box<dyn Error>> {
// `service_fn` is a helper to convert a function that
// returns a Response into a `Service`.
async {
Just::Ok(service_fn(|_req| async {
Just::Ok(Response::new(Body::from(&b"Hello World!"[..])))
Just::Ok(service_fn(|_req| {
async { Just::Ok(Response::new(Body::from(&b"Hello World!"[..]))) }
}))
}
});
Expand Down

0 comments on commit 5b46633

Please sign in to comment.