Skip to content

Commit

Permalink
Remove unnecessary unicode-width feature flag conditionals
Browse files Browse the repository at this point in the history
After #276, the `display_width` function can handle a limited set of
non-ASCII characters. This is enough to make these tests pass both
with and without the `unicode-width` Cargo feature.
  • Loading branch information
mgeisler committed Jan 15, 2022
1 parent 42e31a4 commit ea4c5b3
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1441,7 +1441,6 @@ mod tests {
}

#[test]
#[cfg(feature = "unicode-width")]
fn wide_character_handling() {
assert_eq!(wrap("Hello, World!", 15), vec!["Hello, World!"]);
assert_eq!(
Expand Down Expand Up @@ -1481,7 +1480,6 @@ mod tests {
}

#[test]
#[cfg(feature = "unicode-width")]
fn indent_first_emoji() {
let options = Options::new(10).initial_indent("👉👉");
assert_eq!(
Expand Down Expand Up @@ -2058,7 +2056,6 @@ mod tests {
}

#[test]
#[cfg(feature = "unicode-width")]
fn wrap_columns_with_emojis() {
assert_eq!(
wrap_columns(
Expand Down

0 comments on commit ea4c5b3

Please sign in to comment.