aboutsummaryrefslogtreecommitdiffstats
path: root/src/main.rs
diff options
context:
space:
mode:
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/main.rs b/src/main.rs
index c5e65d7..3c3cd0e 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -54,14 +54,14 @@ fn get_email_body(email: &[u8]) -> Result<String, Box<dyn Error>> {
let body = email.get_body()?;
return Ok(body);
- } else {
- for part in email.subparts {
- for header in part.get_headers() {
- if header.get_key() == "Content-Type"
- && header.get_value().starts_with("text/plain")
- {
- return Ok(part.get_body()?);
- }
+ }
+
+ for part in email.subparts {
+ for header in part.get_headers() {
+ if header.get_key() == "Content-Type"
+ && header.get_value().starts_with("text/plain")
+ {
+ return Ok(part.get_body()?);
}
}
}