Skip to content

Commit 49eb754

Browse files
committed
addressed nits
1 parent 6e5c18e commit 49eb754

File tree

2 files changed

+3
-24
lines changed

2 files changed

+3
-24
lines changed

src/liballoc/boxed.rs

-21
Original file line numberDiff line numberDiff line change
@@ -932,27 +932,6 @@ impl<'a, F: ?Sized + Future> Future for PinBox<F> {
932932
}
933933
}
934934

935-
#[unstable(feature = "futures_api", issue = "50547")]
936-
unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for Box<F> {
937-
fn into_raw(self) -> *mut () {
938-
unsafe {
939-
mem::transmute(self)
940-
}
941-
}
942-
943-
unsafe fn poll(task: *mut (), cx: &mut Context) -> Poll<()> {
944-
let ptr: *mut F = mem::transmute(task);
945-
let pin: PinMut<F> = PinMut::new_unchecked(&mut *ptr);
946-
pin.poll(cx)
947-
}
948-
949-
unsafe fn drop(task: *mut ()) {
950-
let ptr: *mut F = mem::transmute(task);
951-
let boxed = Box::from_raw(ptr);
952-
drop(boxed)
953-
}
954-
}
955-
956935
#[unstable(feature = "futures_api", issue = "50547")]
957936
unsafe impl<F: Future<Output = ()> + Send + 'static> UnsafePoll for PinBox<F> {
958937
fn into_raw(self) -> *mut () {

src/libstd/panic.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -326,9 +326,9 @@ impl<'a, F: Future> Future for AssertUnwindSafe<F> {
326326
unsafe {
327327
let pinned_field = PinMut::new_unchecked(
328328
&mut PinMut::get_mut(self.reborrow()).0
329-
);
330-
331-
pinned_field.poll(cx)
329+
);
330+
331+
pinned_field.poll(cx)
332332
}
333333
}
334334
}

0 commit comments

Comments
 (0)