diff --git a/src/text/abstraction.rs b/src/text/abstraction.rs index 99678ff..08c60c0 100644 --- a/src/text/abstraction.rs +++ b/src/text/abstraction.rs @@ -318,11 +318,7 @@ mod bytes_support { } fn ends_with_newline(&self) -> bool { - if let Some(b'\r') | Some(b'\n') = self.last_byte() { - true - } else { - false - } + matches!(self.last_byte(), Some(b'\r') | Some(b'\n')) } fn len(&self) -> usize { diff --git a/src/text/inline.rs b/src/text/inline.rs index 34cfd39..e036c38 100644 --- a/src/text/inline.rs +++ b/src/text/inline.rs @@ -1,4 +1,3 @@ -#![cfg(feature = "inline")] use std::borrow::Cow; use std::fmt;