From e7954413e16d5814db5da6389f8d6e0c328812aa Mon Sep 17 00:00:00 2001 From: Yusuke Tanaka Date: Fri, 26 Mar 2021 03:17:37 +0900 Subject: upgrade: Rust 1.51.0 (#9895) --- core/ops_bin.rs | 10 +++++----- core/runtime.rs | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'core') diff --git a/core/ops_bin.rs b/core/ops_bin.rs index 053150bfd..3e13c23d5 100644 --- a/core/ops_bin.rs +++ b/core/ops_bin.rs @@ -39,12 +39,12 @@ pub struct ResponseHeader { pub result: u32, } -impl Into<[u8; 16]> for ResponseHeader { - fn into(self) -> [u8; 16] { +impl From for [u8; 16] { + fn from(r: ResponseHeader) -> Self { let mut resp_header = [0u8; 16]; - resp_header[0..8].copy_from_slice(&self.request_id.to_le_bytes()); - resp_header[8..12].copy_from_slice(&self.status.to_le_bytes()); - resp_header[12..16].copy_from_slice(&self.result.to_le_bytes()); + resp_header[0..8].copy_from_slice(&r.request_id.to_le_bytes()); + resp_header[8..12].copy_from_slice(&r.status.to_le_bytes()); + resp_header[12..16].copy_from_slice(&r.result.to_le_bytes()); resp_header } } diff --git a/core/runtime.rs b/core/runtime.rs index c7a945717..9fa626636 100644 --- a/core/runtime.rs +++ b/core/runtime.rs @@ -201,8 +201,8 @@ impl JsRuntime { DENO_INIT.call_once(|| { // Include 10MB ICU data file. #[repr(C, align(16))] - struct ICUData([u8; 10413584]); - static ICU_DATA: ICUData = ICUData(*include_bytes!("icudtl.dat")); + struct IcuData([u8; 10413584]); + static ICU_DATA: IcuData = IcuData(*include_bytes!("icudtl.dat")); v8::icu::set_common_data(&ICU_DATA.0).unwrap(); unsafe { v8_init() }; }); -- cgit v1.2.3