Skip to content
This repository was archived by the owner on Nov 27, 2020. It is now read-only.

Commit 0dab6e8

Browse files
committed
Remove redundant bounds
1 parent 3356d39 commit 0dab6e8

File tree

1 file changed

+5
-20
lines changed

1 file changed

+5
-20
lines changed

src/boxed.rs

Lines changed: 5 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -184,10 +184,7 @@ impl<T, A: AllocRef> Box<T, A> {
184184
/// ```
185185
#[allow(clippy::inline_always)]
186186
#[inline(always)]
187-
pub fn new_in(x: T, a: A) -> Self
188-
where
189-
A: AllocRef,
190-
{
187+
pub fn new_in(x: T, a: A) -> Self {
191188
unsafe { Self::try_new_in(x, a).unwrap_unchecked() }
192189
}
193190

@@ -237,10 +234,7 @@ impl<T, A: AllocRef> Box<T, A> {
237234
/// ```
238235
#[allow(clippy::inline_always)]
239236
#[inline(always)]
240-
pub fn new_uninit_in(a: A) -> Box<mem::MaybeUninit<T>, A>
241-
where
242-
A: AllocRef,
243-
{
237+
pub fn new_uninit_in(a: A) -> Box<mem::MaybeUninit<T>, A> {
244238
unsafe { Self::try_new_uninit_in(a).unwrap_unchecked() }
245239
}
246240

@@ -277,10 +271,7 @@ impl<T, A: AllocRef> Box<T, A> {
277271
/// `Unpin`, then `x` will be pinned in memory and unable to be moved.
278272
#[allow(clippy::inline_always)]
279273
#[inline(always)]
280-
pub fn pin_in(x: T, a: A) -> Pin<Self>
281-
where
282-
A: AllocRef,
283-
{
274+
pub fn pin_in(x: T, a: A) -> Pin<Self> {
284275
unsafe { Self::try_pin_in(x, a).unwrap_unchecked() }
285276
}
286277

@@ -346,10 +337,7 @@ impl<T, A: AllocRef> Box<[T], A> {
346337
/// ```
347338
#[allow(clippy::inline_always)]
348339
#[inline(always)]
349-
pub fn new_uninit_slice_in(len: usize, a: A) -> Box<[mem::MaybeUninit<T>], A>
350-
where
351-
A: AllocRef,
352-
{
340+
pub fn new_uninit_slice_in(len: usize, a: A) -> Box<[mem::MaybeUninit<T>], A> {
353341
unsafe { Self::try_new_uninit_slice_in(len, a).unwrap_unchecked() }
354342
}
355343

@@ -858,10 +846,7 @@ where
858846
impl<T: Clone, A: AllocRef, B: AllocRef> CloneIn<B> for Box<T, A> {
859847
type Cloned = Box<T, B>;
860848

861-
fn clone_in(&self, a: B) -> Self::Cloned
862-
where
863-
B: AllocRef,
864-
{
849+
fn clone_in(&self, a: B) -> Self::Cloned {
865850
Box::new_in(self.as_ref().clone(), a)
866851
}
867852

0 commit comments

Comments
 (0)