Skip to content

Commit

Permalink
Fix imports
Browse files Browse the repository at this point in the history
  • Loading branch information
pemistahl committed Jun 2, 2021
1 parent 3d8cf9e commit 47f3003
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/isocode.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
*/

use std::fmt::{Debug, Display, Formatter, Result};
use std::str::FromStr;
use strum_macros::EnumString;

/// This enum specifies the ISO 639-1 code representations for the supported languages.
Expand Down Expand Up @@ -501,6 +500,7 @@ impl Display for IsoCode639_3 {
#[cfg(test)]
mod tests {
use super::*;
use std::str::FromStr;

#[test]
fn assert_iso_code_639_1_string_representation_is_correct() {
Expand Down
6 changes: 4 additions & 2 deletions src/language.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,13 @@ use crate::alphabet::Alphabet;
use crate::isocode::{IsoCode639_1, IsoCode639_3};
use serde::{Deserialize, Serialize};
use std::collections::HashSet;
use std::str::FromStr;
use strum::IntoEnumIterator;
use strum_macros::{EnumIter, EnumString};

/// This enum specifies the so far 75 supported languages which can be detected by *Lingua*.
#[derive(Clone, Debug, Serialize, Deserialize, EnumIter, Eq, PartialEq, Hash, Ord, PartialOrd, EnumString)]
#[derive(
Clone, Debug, Serialize, Deserialize, EnumIter, Eq, PartialEq, Hash, Ord, PartialOrd, EnumString,
)]
#[serde(rename_all(serialize = "UPPERCASE", deserialize = "UPPERCASE"))]
#[strum(ascii_case_insensitive)]
pub enum Language {
Expand Down Expand Up @@ -423,6 +424,7 @@ impl Language {
mod tests {
use super::*;
use crate::language::Language::*;
use std::str::FromStr;

#[test]
fn test_language_serializer() {
Expand Down

0 comments on commit 47f3003

Please sign in to comment.