summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLars Wirzenius <liw@sequoia-pgp.org>2022-09-29 17:12:14 +0300
committerLars Wirzenius <liw@sequoia-pgp.org>2022-09-29 17:12:14 +0300
commita551039a40cc1d936f757578fa70101385af4fed (patch)
tree2c547daa7b8983979cbaddf6321b2a602e9fb0c5
parent80e55e71e697897321ba0525000914706a369e93 (diff)
downloadenterprise-hello-a551039a40cc1d936f757578fa70101385af4fed.tar.gz
shorten lines for slides
Sponsored-by: author
-rw-r--r--src/main.rs8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/main.rs b/src/main.rs
index d40d0fe..ceb34da 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -27,9 +27,13 @@ impl Args {
fn whom(&self) -> Result<String, HelloError> {
if let Some(filename) = &self.filename {
let data = read(&filename)
- .map_err(|e| HelloError::Read(filename.clone(), e))?;
+ .map_err(|e| {
+ HelloError::Read(filename.clone(), e)
+ })?;
let whom = String::from_utf8(data)
- .map_err(|e| HelloError::Utf8(filename.clone(), e))?;
+ .map_err(|e| {
+ HelloError::Utf8(filename.clone(), e)
+ })?;
Ok(whom.trim().to_string())
} else {
Ok(self.whom.clone())