Skip to content

Commit

Permalink
minor changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ssrlive committed Nov 30, 2024
1 parent 2f421c5 commit 8ff0446
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ jobs:

steps:
- uses: actions/checkout@v4
- uses: openharmony-rs/setup-ohos-sdk@v0.1
- uses: openharmony-rs/setup-ohos-sdk@v0.2
id: setup-ohos
with:
version: "5.0"
Expand All @@ -103,7 +103,7 @@ jobs:
- name: fmt & clippy
if: ${{ !cancelled() }}
run: |
ohrs cargo --disable-target -- fmt --all -- --check
cargo fmt --all -- --check
ohrs cargo --disable-target -- clippy --target ${{matrix.target}} --all-features --features="async tokio/rt-multi-thread" -- -D warnings
- name: Build
if: ${{ !cancelled() }}
Expand Down
12 changes: 6 additions & 6 deletions src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ impl ToAddress for str {
}
}

impl<'a> ToAddress for &'a str {
impl ToAddress for &str {
fn to_address(&self) -> Result<IpAddr> {
(*self).to_address()
}
Expand All @@ -63,7 +63,7 @@ impl ToAddress for String {
}
}

impl<'a> ToAddress for &'a String {
impl ToAddress for &String {
fn to_address(&self) -> Result<IpAddr> {
self.as_str().to_address()
}
Expand All @@ -75,7 +75,7 @@ impl ToAddress for Ipv4Addr {
}
}

impl<'a> ToAddress for &'a Ipv4Addr {
impl ToAddress for &Ipv4Addr {
fn to_address(&self) -> Result<IpAddr> {
(*self).to_address()
}
Expand All @@ -87,7 +87,7 @@ impl ToAddress for IpAddr {
}
}

impl<'a> ToAddress for &'a IpAddr {
impl ToAddress for &IpAddr {
fn to_address(&self) -> Result<IpAddr> {
(*self).to_address()
}
Expand All @@ -99,7 +99,7 @@ impl ToAddress for SocketAddrV4 {
}
}

impl<'a> ToAddress for &'a SocketAddrV4 {
impl ToAddress for &SocketAddrV4 {
fn to_address(&self) -> Result<IpAddr> {
(*self).to_address()
}
Expand All @@ -111,7 +111,7 @@ impl ToAddress for SocketAddr {
}
}

impl<'a> ToAddress for &'a SocketAddr {
impl ToAddress for &SocketAddr {
fn to_address(&self) -> Result<IpAddr> {
(*self).to_address()
}
Expand Down

0 comments on commit 8ff0446

Please sign in to comment.