Skip to content
This repository was archived by the owner on Dec 29, 2022. It is now read-only.

Commit 7761299

Browse files
committed
Apply feedback
1 parent 2487377 commit 7761299

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/config.rs

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,9 @@ impl<'de, T: Deserialize<'de>> Deserialize<'de> for Inferrable<T> {
6969

7070
impl<T> Inferrable<T> {
7171
pub fn is_none(&self) -> bool {
72-
if let &Inferrable::None = self {
73-
return false;
74-
} else {
75-
return true;
72+
match *self {
73+
Inferrable::None => true,
74+
_ => false,
7675
}
7776
}
7877
}
@@ -214,11 +213,9 @@ impl Config {
214213

215214
/// Is this config incomplete, and needs additional values to be inferred?
216215
pub fn needs_inference(&self) -> bool {
217-
if self.build_bin.is_none() || self.build_lib.is_none() || self.target_dir.is_none() {
218-
return true;
219-
}
220-
221-
return true;
216+
self.build_bin.is_none() ||
217+
self.build_lib.is_none() ||
218+
self.target_dir.is_none()
222219
}
223220

224221
/// Tries to auto-detect certain option values if they were unspecified.

0 commit comments

Comments
 (0)