Skip to content

Commit

Permalink
Update chars.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
SamHDev committed Apr 20, 2024
1 parent 16c9dc5 commit 9b80236
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions protobuf/src/chars.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ use std::borrow::Borrow;
use std::fmt;
use std::ops::Deref;
use std::str;
use std::convert::AsRef;

use bytes::Bytes;

Expand Down Expand Up @@ -81,6 +82,12 @@ impl Borrow<str> for Chars {
}
}

impl AsRef<Bytes> for Chars {

Check failure on line 85 in protobuf/src/chars.rs

View workflow job for this annotation

GitHub Actions / rustfmt check

not all trait items implemented, missing: `as_ref`

Check failure on line 85 in protobuf/src/chars.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

not all trait items implemented, missing: `as_ref`
fn borrow(&self) -> &Bytes {

Check failure on line 86 in protobuf/src/chars.rs

View workflow job for this annotation

GitHub Actions / rustfmt check

method `borrow` is not a member of trait `AsRef`

Check failure on line 86 in protobuf/src/chars.rs

View workflow job for this annotation

GitHub Actions / linux stable (with-bytes)

method `borrow` is not a member of trait `AsRef`
&self.0
}
}

impl fmt::Display for Chars {
#[inline]
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
Expand Down

0 comments on commit 9b80236

Please sign in to comment.