diff --git a/CHANGELOG.md b/CHANGELOG.md
index ecc87fd..15f6e63 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -7,6 +7,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 
 ## [Unreleased]
 
+### Fixed
+
+- Rust edition transition [#303]
+
 ## [0.5.6] - 2022-02-22
 
 ### Added
@@ -433,3 +437,4 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
 [#280]: https://github.com/soywod/himalaya/issues/280
 [#288]: https://github.com/soywod/himalaya/issues/288
 [#289]: https://github.com/soywod/himalaya/issues/289
+[#303]: https://github.com/soywod/himalaya/issues/303
diff --git a/Cargo.toml b/Cargo.toml
index 13c36e0..9bb05f0 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -3,7 +3,7 @@ name = "himalaya"
 description = "Command-line interface for email management"
 version = "0.5.6"
 authors = ["soywod <clement.douin@posteo.net>"]
-edition = "2021"
+edition = "2018"
 license-file = "LICENSE"
 readme = "README.md"
 categories = ["command-line-interface", "command-line-utilities", "email"]
diff --git a/src/backends/imap/imap_flag.rs b/src/backends/imap/imap_flag.rs
index a946fee..87bb8b9 100644
--- a/src/backends/imap/imap_flag.rs
+++ b/src/backends/imap/imap_flag.rs
@@ -1,5 +1,9 @@
 use anyhow::{anyhow, Error, Result};
-use std::{convert::TryFrom, fmt, ops::Deref};
+use std::{
+    convert::{TryFrom, TryInto},
+    fmt,
+    ops::Deref,
+};
 
 /// Represents the imap flag variants.
 #[derive(Debug, Clone, PartialEq, Eq, serde::Serialize)]
diff --git a/src/msg/msg_entity.rs b/src/msg/msg_entity.rs
index e4f3b5c..2ca5441 100644
--- a/src/msg/msg_entity.rs
+++ b/src/msg/msg_entity.rs
@@ -5,7 +5,7 @@ use html_escape;
 use lettre::message::{header::ContentType, Attachment, MultiPart, SinglePart};
 use log::{debug, info, trace};
 use regex::Regex;
-use std::{collections::HashSet, env::temp_dir, fmt::Debug, fs, path::PathBuf};
+use std::{collections::HashSet, convert::TryInto, env::temp_dir, fmt::Debug, fs, path::PathBuf};
 use uuid::Uuid;
 
 use crate::{