Skip to content

Commit

Permalink
added deref to runtime_type.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
SamHDev committed Apr 20, 2024
1 parent 3aff8c3 commit 22b4010
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion protobuf/src/reflect/runtime_types.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
use std::collections::HashMap;
use std::fmt;
use std::marker;
use std::ops::Deref;

Check warning on line 6 in protobuf/src/reflect/runtime_types.rs

View workflow job for this annotation

GitHub Actions / rustfmt check

unused import: `std::ops::Deref`

Check warning on line 6 in protobuf/src/reflect/runtime_types.rs

View workflow job for this annotation

GitHub Actions / linux stable (default features)

unused import: `std::ops::Deref`

Check warning on line 6 in protobuf/src/reflect/runtime_types.rs

View workflow job for this annotation

GitHub Actions / linux beta (default features)

unused import: `std::ops::Deref`

#[cfg(feature = "bytes")]
use bytes::Bytes;
Expand Down Expand Up @@ -738,7 +739,7 @@ impl RuntimeTypeTrait for RuntimeTypeTokioChars {
}

fn as_ref(value: &Chars) -> ReflectValueRef {
ReflectValueRef::String(value.as_ref())
ReflectValueRef::String(<Chars as Deref>::deref(value))
}

fn is_non_zero(value: &Chars) -> bool {
Expand Down

0 comments on commit 22b4010

Please sign in to comment.