From 9ece537a891aca83ffc8c006695f6d813996e736 Mon Sep 17 00:00:00 2001 From: kazuya kawaguchi Date: Mon, 8 Jan 2024 22:01:25 +0900 Subject: [PATCH] fix: clippy warnings --- src/extensions.rs | 1 + src/locale.rs | 2 +- src/measure.rs | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/src/extensions.rs b/src/extensions.rs index ed598ff..6630476 100644 --- a/src/extensions.rs +++ b/src/extensions.rs @@ -85,6 +85,7 @@ impl fmt::Display for Extensions { } } +#[allow(dead_code)] pub fn parse_extensions(chunk: &str) -> Result { // check empty if chunk.is_empty() { diff --git a/src/locale.rs b/src/locale.rs index 8f550ec..4c0fb34 100644 --- a/src/locale.rs +++ b/src/locale.rs @@ -1,6 +1,6 @@ use crate::constants::SEP; use crate::errors::ParserError; -use crate::extensions::{self, parse_extensions_from_iter, Extensions}; +use crate::extensions::{parse_extensions_from_iter, Extensions}; use crate::lang::{parse_unicode_language_id_from_iter, UnicodeLanguageIdentifier}; use crate::shared::split_str; diff --git a/src/measure.rs b/src/measure.rs index c3cab17..b1aa33e 100644 --- a/src/measure.rs +++ b/src/measure.rs @@ -54,7 +54,7 @@ fn parse_unicode_measure_unit_from_iter<'a>( return Err(ParserError::InvalidSubtag); } - values.push(String::from(subtag.to_string())); + values.push(subtag.to_string()); iter.next(); }