summaryrefslogtreecommitdiffstats
path: root/src/input.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/input.rs')
-rw-r--r--src/input.rs11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/input.rs b/src/input.rs
index 3a723631..1e7aec2f 100644
--- a/src/input.rs
+++ b/src/input.rs
@@ -137,17 +137,12 @@ impl<'a> Input<'a> {
}
pub fn is_stdin(&self) -> bool {
- if let InputKind::StdIn = self.kind {
- true
- } else {
- false
- }
+ matches!(self.kind, InputKind::StdIn)
}
pub fn with_name(mut self, provided_name: Option<&OsStr>) -> Self {
- match provided_name {
- Some(name) => self.description.name = name.to_string_lossy().to_string(),
- None => {}
+ if let Some(name) = provided_name {
+ self.description.name = name.to_string_lossy().to_string()
}
self.metadata.user_provided_name = provided_name.map(|n| n.to_owned());