Skip to content

Commit 9376358

Browse files
committed
style(napi): reformat with the latest rustfmt-nightly
1 parent 4d27697 commit 9376358

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

napi/src/result.rs

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,19 @@ impl Error for NapiError {
9494
impl Display for NapiError {
9595
fn fmt(&self, formatter: &mut fmt::Formatter) -> fmt::Result {
9696
write!(formatter, "{}", self.description())
97-
.and_then(|result| if let Some(ref message) = self.message {
98-
write!(formatter, " ({})", message)
99-
} else {
100-
Ok(result)
97+
.and_then(|result| {
98+
if let Some(ref message) = self.message {
99+
write!(formatter, " ({})", message)
100+
} else {
101+
Ok(result)
102+
}
101103
})
102-
.and_then(|result| if self.exception.is_some() {
103-
write!(formatter, ", JavaScript exception attached")
104-
} else {
105-
Ok(result)
104+
.and_then(|result| {
105+
if self.exception.is_some() {
106+
write!(formatter, ", JavaScript exception attached")
107+
} else {
108+
Ok(result)
109+
}
106110
})
107111
}
108112
}

0 commit comments

Comments
 (0)