Add ?Sized to PartialEq for Lua String
This commit is contained in:
parent
b532f86674
commit
fdb5724053
|
@ -163,7 +163,7 @@ impl<'lua> Borrow<[u8]> for String<'lua> {
|
||||||
// in other ways.
|
// in other ways.
|
||||||
impl<'lua, T> PartialEq<T> for String<'lua>
|
impl<'lua, T> PartialEq<T> for String<'lua>
|
||||||
where
|
where
|
||||||
T: AsRef<[u8]>,
|
T: AsRef<[u8]> + ?Sized,
|
||||||
{
|
{
|
||||||
fn eq(&self, other: &T) -> bool {
|
fn eq(&self, other: &T) -> bool {
|
||||||
self.as_bytes() == other.as_ref()
|
self.as_bytes() == other.as_ref()
|
||||||
|
|
Loading…
Reference in New Issue