Skip to content

Commit c268bd6

Browse files
committed
cargo fmt
1 parent 71b5e14 commit c268bd6

File tree

5 files changed

+29
-23
lines changed

5 files changed

+29
-23
lines changed

crates/eqwalizer/src/ipc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ use timeout_readwrite::TimeoutWriter;
4242

4343
#[cfg(windows)]
4444
mod win_timeout {
45-
use std::io::{Read, Write, Result};
45+
use std::io::{Read, Result, Write};
4646
use std::time::Duration;
4747

4848
pub struct TimeoutReader<R>(R, Duration);

crates/erlang_service/build.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,23 +27,26 @@ fn main() {
2727

2828
let mut cmd = if cfg!(target_os = "windows") {
2929
let rebar3_name = "rebar3";
30-
let rebar3_path = env::var("PATH").ok().and_then(|paths| {
31-
env::split_paths(&paths).find_map(|dir| {
32-
let candidate = dir.join(rebar3_name);
33-
if candidate.exists() {
34-
Some(candidate)
35-
} else {
36-
None
37-
}
30+
let rebar3_path = env::var("PATH")
31+
.ok()
32+
.and_then(|paths| {
33+
env::split_paths(&paths).find_map(|dir| {
34+
let candidate = dir.join(rebar3_name);
35+
if candidate.exists() {
36+
Some(candidate)
37+
} else {
38+
None
39+
}
40+
})
3841
})
39-
}).expect("rebar3 not found in PATH - install and add to PATH");
42+
.expect("rebar3 not found in PATH - install and add to PATH");
4043

4144
let mut cmd = Command::new("escript");
4245

4346
cmd.arg(rebar3_path);
4447
cmd
4548
} else {
46-
Command::new("rebar3")
49+
Command::new("rebar3")
4750
};
4851

4952
let output = cmd

crates/erlang_service/src/lib.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -864,7 +864,8 @@ fn path_into_list(path: PathBuf) -> eetf::ByteList {
864864
fn path_into_list(path: PathBuf) -> eetf::ByteList {
865865
use std::os::windows::ffi::OsStrExt;
866866
eetf::ByteList {
867-
bytes: String::from_utf16_lossy(&path.as_os_str().encode_wide().collect::<Vec<u16>>()).into_bytes(),
867+
bytes: String::from_utf16_lossy(&path.as_os_str().encode_wide().collect::<Vec<u16>>())
868+
.into_bytes(),
868869
}
869870
}
870871

crates/project_model/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -980,7 +980,6 @@ impl Project {
980980
rebar_setting.config_file
981981
);
982982
let rebar_version = {
983-
984983
let mut cmd = RebarConfig::rebar3_command_base();
985984
cmd.arg("version");
986985
utf8_stdout(&mut cmd)?

crates/project_model/src/rebar.rs

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -72,16 +72,19 @@ impl RebarConfig {
7272
lazy_static! {
7373
static ref REBAR3_PATH: PathBuf = {
7474
let rebar3_name = "rebar3";
75-
env::var("PATH").ok().and_then(|paths| {
76-
env::split_paths(&paths).find_map(|dir| {
77-
let candidate = dir.join(rebar3_name);
78-
if candidate.exists() {
79-
Some(candidate)
80-
} else {
81-
None
82-
}
75+
env::var("PATH")
76+
.ok()
77+
.and_then(|paths| {
78+
env::split_paths(&paths).find_map(|dir| {
79+
let candidate = dir.join(rebar3_name);
80+
if candidate.exists() {
81+
Some(candidate)
82+
} else {
83+
None
84+
}
85+
})
8386
})
84-
}).expect("rebar3 not found in PATH - install and add to PATH")
87+
.expect("rebar3 not found in PATH - install and add to PATH")
8588
};
8689
}
8790

@@ -100,7 +103,7 @@ impl RebarConfig {
100103
let guard = REBAR_GLOBAL_LOCK.lock();
101104

102105
let mut cmd = Self::rebar3_command_base();
103-
106+
104107
cmd.arg("as");
105108
cmd.arg(&self.profile.0);
106109
if let Some(parent) = self.config_file.parent() {

0 commit comments

Comments
 (0)