Skip to content

Commit a6f9372

Browse files
committed
Fix other lints
Not needing to name references in type parameters became possible in Rust 1.31.
1 parent 32400a2 commit a6f9372

File tree

2 files changed

+11
-10
lines changed

2 files changed

+11
-10
lines changed

src/ascii_char.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -970,6 +970,7 @@ mod tests {
970970

971971
#[test]
972972
fn is_all() {
973+
#![allow(clippy::is_digit_ascii_radix)] // testing it
973974
for byte in 0..128_u8 {
974975
let ch = byte as char;
975976
let ascii = AsciiChar::new(ch);

src/ascii_string.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -451,7 +451,7 @@ impl PartialEq<AsciiString> for str {
451451

452452
macro_rules! impl_eq {
453453
($lhs:ty, $rhs:ty) => {
454-
impl<'a> PartialEq<$rhs> for $lhs {
454+
impl PartialEq<$rhs> for $lhs {
455455
#[inline]
456456
fn eq(&self, other: &$rhs) -> bool {
457457
PartialEq::eq(&**self, &**other)
@@ -462,24 +462,24 @@ macro_rules! impl_eq {
462462

463463
impl_eq! { AsciiString, String }
464464
impl_eq! { String, AsciiString }
465-
impl_eq! { &'a AsciiStr, String }
466-
impl_eq! { String, &'a AsciiStr }
467-
impl_eq! { &'a AsciiStr, AsciiString }
468-
impl_eq! { AsciiString, &'a AsciiStr }
469-
impl_eq! { &'a str, AsciiString }
470-
impl_eq! { AsciiString, &'a str }
465+
impl_eq! { &AsciiStr, String }
466+
impl_eq! { String, &AsciiStr }
467+
impl_eq! { &AsciiStr, AsciiString }
468+
impl_eq! { AsciiString, &AsciiStr }
469+
impl_eq! { &str, AsciiString }
470+
impl_eq! { AsciiString, &str }
471471

472472
impl Borrow<AsciiStr> for AsciiString {
473473
#[inline]
474474
fn borrow(&self) -> &AsciiStr {
475-
&*self
475+
&**self
476476
}
477477
}
478478

479479
impl BorrowMut<AsciiStr> for AsciiString {
480480
#[inline]
481481
fn borrow_mut(&mut self) -> &mut AsciiStr {
482-
&mut *self
482+
&mut **self
483483
}
484484
}
485485

@@ -599,7 +599,7 @@ impl<'a> From<&'a AsciiStr> for Cow<'a, AsciiStr> {
599599
impl AsRef<AsciiStr> for AsciiString {
600600
#[inline]
601601
fn as_ref(&self) -> &AsciiStr {
602-
&*self
602+
&**self
603603
}
604604
}
605605

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy