Skip to content

Commit

Permalink
Appease new clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
thomcc committed Nov 4, 2022
1 parent 72d9d0b commit 68cb138
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 9 deletions.
9 changes: 3 additions & 6 deletions src/arc_str.rs
Original file line number Diff line number Diff line change
Expand Up @@ -948,22 +948,19 @@ impl From<ArcStr> for alloc::sync::Arc<str> {
impl From<alloc::rc::Rc<str>> for ArcStr {
#[inline]
fn from(s: alloc::rc::Rc<str>) -> Self {
let s: &str = &*s;
Self::from(s)
Self::from(&*s)
}
}
impl From<alloc::sync::Arc<str>> for ArcStr {
#[inline]
fn from(s: alloc::sync::Arc<str>) -> Self {
let s: &str = &*s;
Self::from(s)
Self::from(&*s)
}
}
impl<'a> From<Cow<'a, str>> for ArcStr {
#[inline]
fn from(s: Cow<'a, str>) -> Self {
let s: &str = &*s;
Self::from(s)
Self::from(&*s)
}
}
impl<'a> From<&'a ArcStr> for Cow<'a, str> {
Expand Down
7 changes: 4 additions & 3 deletions src/substr.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#![allow(
// We follow libstd's lead and prefer to define both.
// We follow libstd's lead and prefer to define both.
clippy::partialeq_ne_impl,
// This is a really annoying clippy lint, since it's required for so many cases...
// This is a really annoying clippy lint, since it's required for so many cases...
clippy::cast_ptr_alignment,
// For macros
// For macros
clippy::redundant_slicing,
)]
#![cfg_attr(feature = "substr-usize-indices", allow(clippy::unnecessary_cast))]
use crate::ArcStr;
use core::ops::{Range, RangeBounds};

Expand Down

0 comments on commit 68cb138

Please sign in to comment.