Skip to content

Commit

Permalink
fix identifier
Browse files Browse the repository at this point in the history
  • Loading branch information
JieningYu committed Aug 25, 2024
1 parent 9033d72 commit e79cdb5
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 7 deletions.
6 changes: 1 addition & 5 deletions crates/util/identifier/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -157,11 +157,7 @@ mod serde {

#[cfg(feature = "edcode")]
mod edcode {
use std::{
fmt::Display,
io::{self, ErrorKind},
str::FromStr,
};
use std::{fmt::Display, str::FromStr};

use rimecraft_edcode2::{Buf, BufMut, Decode, Encode};

Expand Down
4 changes: 2 additions & 2 deletions crates/util/identifier/src/vanilla.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ impl Namespace {
where
T: Into<Arc<str>>,
{
let value = value.into();
let value = Into::<Arc<str>>::into(value);
validate_namespace(&value).unwrap();
Self(ArcCowStr::Arc(value))
}
Expand Down Expand Up @@ -103,7 +103,7 @@ impl Path {
where
T: Into<Arc<str>>,
{
let value = value.into();
let value = Into::<Arc<str>>::into(value);
validate_path(&value)?;
Ok(Self(ArcCowStr::Arc(value)))
}
Expand Down

0 comments on commit e79cdb5

Please sign in to comment.