Skip to content

Commit 4e45908

Browse files
remove unsfae
1 parent 3a5383d commit 4e45908

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/chunked.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -232,8 +232,8 @@ impl<R: BufRead + Unpin + Send + 'static> ChunkedDecoder<R> {
232232
State::TrailerDone(ref mut headers) => {
233233
let headers = std::mem::replace(headers, Vec::new());
234234
for (name, value) in headers.into_iter() {
235-
let mut fut = self.trailer_sender.send((name, value));
236-
match unsafe { Pin::new_unchecked(&mut fut) }.poll(cx) {
235+
let mut fut = Box::pin(self.trailer_sender.send((name, value)));
236+
match Pin::new(&mut fut).poll(cx) {
237237
Poll::Ready(_) => {}
238238
Poll::Pending => {
239239
return Ok(DecodeResult::Some {

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@
2828
//! // tbi
2929
//! ```
3030
31-
// #![forbid(unsafe_code, rust_2018_idioms)]
31+
#![forbid(unsafe_code, rust_2018_idioms)]
3232
#![deny(missing_debug_implementations, nonstandard_style)]
3333
// #![warn(missing_docs, missing_doc_code_examples, unreachable_pub)]
3434
// #![cfg_attr(test, deny(warnings))]

0 commit comments

Comments
 (0)