Skip to content

Commit

Permalink
shadowed impl for to_string
Browse files Browse the repository at this point in the history
  • Loading branch information
Rohit Kulkarni committed Feb 14, 2025
1 parent d27cbc9 commit 6c1b6d8
Showing 1 changed file with 0 additions and 10 deletions.
10 changes: 0 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -120,16 +120,6 @@ impl<'a> fmt::Display for TargetAddr<'a> {
}
}

impl<'a> TargetAddr<'a> {
/// Converts the `TargetAddr` to a `String`.
pub fn to_string(&self) -> String {
match self {
TargetAddr::Ip(addr) => addr.to_string(),
TargetAddr::Domain(domain, port) => format!("{}:{}", domain, port),
}
}
}

impl<'a> TargetAddr<'a> {

Check failure on line 123 in src/lib.rs

View workflow job for this annotation

GitHub Actions / test (stable)

the following explicit lifetimes could be elided: 'a
/// Creates owned `TargetAddr` by cloning. It is usually used to eliminate
/// the lifetime bound.
Expand Down

0 comments on commit 6c1b6d8

Please sign in to comment.