diff options
| author | 林炳权 <695601626@qq.com> | 2024-04-11 06:08:23 +0800 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2024-04-10 22:08:23 +0000 |
| commit | 9304126be5633d4e7d384a8df87f5833a7a145e2 (patch) | |
| tree | c074d89e9f2423c5121721ea94b9b4fb3101a482 /ext/http | |
| parent | c6f1107e9c8835389479f4f2d80d3539d23df41e (diff) | |
chore: update to Rust 1.77.2 (#23262)
update to Rust 1.77.2
---------
Co-authored-by: Matt Mastracci <matthew@mastracci.com>
Diffstat (limited to 'ext/http')
| -rw-r--r-- | ext/http/http_next.rs | 25 | ||||
| -rw-r--r-- | ext/http/service.rs | 2 |
2 files changed, 2 insertions, 25 deletions
diff --git a/ext/http/http_next.rs b/ext/http/http_next.rs index 99d602fcc..a6527397f 100644 --- a/ext/http/http_next.rs +++ b/ext/http/http_next.rs @@ -20,6 +20,7 @@ use crate::websocket_upgrade::WebSocketUpgrade; use crate::LocalExecutor; use cache_control::CacheControl; use deno_core::error::AnyError; +use deno_core::external; use deno_core::futures::future::poll_fn; use deno_core::futures::TryFutureExt; use deno_core::op2; @@ -130,30 +131,6 @@ impl< #[repr(transparent)] struct RcHttpRecord(Rc<HttpRecord>); -// Temp copy -/// Define an external type. -macro_rules! external { - ($type:ident, $name:literal) => { - impl deno_core::Externalizable for $type { - fn external_marker() -> usize { - // Use the address of a static mut as a way to get around lack of usize-sized TypeId. Because it is mutable, the - // compiler cannot collapse multiple definitions into one. - static mut DEFINITION: deno_core::ExternalDefinition = - deno_core::ExternalDefinition::new($name); - // Wash the pointer through black_box so the compiler cannot see what we're going to do with it and needs - // to assume it will be used for valid purposes. - // SAFETY: temporary while waiting on deno core bump - let ptr = std::hint::black_box(unsafe { &mut DEFINITION } as *mut _); - ptr as usize - } - - fn external_name() -> &'static str { - $name - } - } - }; -} - // Register the [`HttpRecord`] as an external. external!(RcHttpRecord, "http record"); diff --git a/ext/http/service.rs b/ext/http/service.rs index 654da25b3..932575e37 100644 --- a/ext/http/service.rs +++ b/ext/http/service.rs @@ -150,7 +150,7 @@ impl std::ops::Deref for HttpServerState { enum RequestBodyState { Incoming(Incoming), - Resource(HttpRequestBodyAutocloser), + Resource(#[allow(dead_code)] HttpRequestBodyAutocloser), } impl From<Incoming> for RequestBodyState { |
