Skip to content

Commit

Permalink
fix: clippy warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
kazupon committed Jan 8, 2024
1 parent b269954 commit 3be7c12
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/extensions/transformed.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl fmt::Display for TransformedExtensions {
}

pub fn parse_transformed_extensions<'a>(
mut iter: &mut Peekable<impl Iterator<Item = &'a str>>,
iter: &mut Peekable<impl Iterator<Item = &'a str>>,
) -> Result<TransformedExtensions, ParserError> {
// transformed_extensions
// https://unicode.org/reports/tr35/#transformed_extensions
Expand Down Expand Up @@ -73,7 +73,7 @@ pub fn parse_transformed_extensions<'a>(
tvalue.push(subtag.to_string());
iter.next();
} else if is_language_subtag(subtag_bytes) {
tlang = Some(parse_unicode_language_id_from_iter(&mut iter)?);
tlang = Some(parse_unicode_language_id_from_iter(iter)?);
} else {
return Err(ParserError::InvalidSubtag);
}
Expand Down
18 changes: 9 additions & 9 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,18 @@
//!
//! ## 🚀 Usages
//!
//! ```rust
//! ```
//! use unicode_locale_parser::parse_locale_id;
//!
//! fn main() {
//! // simple language
//! let locale = parse_locale_id("ja-JP");
//! println!("{:#?}", locale);
//! # fn main() {
//! // simple language
//! let locale = parse_locale_id("ja-JP");
//! println!("{:#?}", locale);
//!
//! // language & unicode locale extension
//! let locale = parse_locale_id("de-Latn-DE-u-ca-buddhist");
//! println!("{:#?}", locale);
//! }
//! // language & unicode locale extension
//! let locale = parse_locale_id("de-Latn-DE-u-ca-buddhist");
//! println!("{:#?}", locale);
//! # }
//! ```
//!
//! ## 🤝 API
Expand Down
2 changes: 1 addition & 1 deletion src/measure.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ impl fmt::Display for UnicodeMeasureUnit {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
let mut messages = vec![];
for value in &self.values {
messages.push(format!("{}", value));
messages.push(value.to_string());
}
write!(f, "{}", messages.join(&SEP.to_string()))?;
Ok(())
Expand Down

0 comments on commit 3be7c12

Please sign in to comment.