Skip to content

Commit

Permalink
fix: add prefix to std to avoid namespace conflict
Browse files Browse the repository at this point in the history
  • Loading branch information
cijiugechu committed Apr 8, 2024
1 parent d1b6021 commit 02a866b
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -496,7 +496,7 @@ impl fmt::Display for Version {
macro_rules! impl_from_unsigned_for_version {
($($t:ident),+) => {
$(
impl std::convert::From<($t, $t, $t)> for Version {
impl ::std::convert::From<($t, $t, $t)> for Version {
fn from((major, minor, patch): ($t, $t, $t)) -> Self {
Version {
major: major as u64,
Expand All @@ -508,7 +508,7 @@ macro_rules! impl_from_unsigned_for_version {
}
}

impl std::convert::From<($t, $t, $t, $t)> for Version {
impl ::std::convert::From<($t, $t, $t, $t)> for Version {
fn from((major, minor, patch, pre_release): ($t, $t, $t, $t)) -> Self {
Version {
major: major as u64,
Expand All @@ -526,7 +526,7 @@ macro_rules! impl_from_unsigned_for_version {
macro_rules! impl_from_signed_for_version {
($($t:ident),+) => {
$(
impl std::convert::From<($t, $t, $t)> for Version {
impl ::std::convert::From<($t, $t, $t)> for Version {
fn from((major, minor, patch): ($t, $t, $t)) -> Self {
debug_assert!(major >= 0, "Version major must be non-negative, got {}", major);
debug_assert!(minor >= 0, "Version minor must be non-negative, got {}", minor);
Expand All @@ -542,7 +542,7 @@ macro_rules! impl_from_signed_for_version {
}
}

impl std::convert::From<($t, $t, $t, $t)> for Version {
impl ::std::convert::From<($t, $t, $t, $t)> for Version {
fn from((major, minor, patch, pre_release): ($t, $t, $t, $t)) -> Self {
debug_assert!(major >= 0, "Version major must be non-negative, got {}", major);
debug_assert!(minor >= 0, "Version minor must be non-negative, got {}", minor);
Expand Down

0 comments on commit 02a866b

Please sign in to comment.