summaryrefslogtreecommitdiff
path: root/ext
diff options
context:
space:
mode:
authorSatya Rohith <me@satyarohith.com>2024-06-14 17:10:57 +0530
committerGitHub <noreply@github.com>2024-06-14 17:10:57 +0530
commit0f48313565ed2620efbd9d0f2203b57f8f126e6a (patch)
tree39e348917188b7524eadc138dfcf80f92a185ac6 /ext
parente19ee6eecc416a99801231ac53f2c512ba1f81dd (diff)
chore: upgrade to rust 1.79 (#24207)
Diffstat (limited to 'ext')
-rw-r--r--ext/ffi/ir.rs5
-rw-r--r--ext/kv/sqlite.rs2
-rw-r--r--ext/node/ops/crypto/mod.rs1
-rw-r--r--ext/node/ops/crypto/x509.rs4
-rw-r--r--ext/node/ops/os/cpus.rs2
-rw-r--r--ext/web/lib.rs1
6 files changed, 8 insertions, 7 deletions
diff --git a/ext/ffi/ir.rs b/ext/ffi/ir.rs
index 520ead92e..ebf64945b 100644
--- a/ext/ffi/ir.rs
+++ b/ext/ffi/ir.rs
@@ -8,7 +8,7 @@ use libffi::middle::Arg;
use std::ffi::c_void;
use std::ptr;
-pub struct OutBuffer(pub *mut u8, pub usize);
+pub struct OutBuffer(pub *mut u8);
// SAFETY: OutBuffer is allocated by us in 00_ffi.js and is guaranteed to be
// only used for the purpose of writing return value of structs.
@@ -23,9 +23,8 @@ pub fn out_buffer_as_ptr(
match out_buffer {
Some(out_buffer) => {
let ab = out_buffer.buffer(scope).unwrap();
- let len = ab.byte_length();
ab.data()
- .map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8, len))
+ .map(|non_null| OutBuffer(non_null.as_ptr() as *mut u8))
}
None => None,
}
diff --git a/ext/kv/sqlite.rs b/ext/kv/sqlite.rs
index 6dd821bda..37f5aa685 100644
--- a/ext/kv/sqlite.rs
+++ b/ext/kv/sqlite.rs
@@ -195,7 +195,7 @@ fn canonicalize_path(path: &Path) -> Result<PathBuf, AnyError> {
} else {
names_stack.push(path.to_str().unwrap().to_string());
let current_dir = current_dir()?;
- path = current_dir.clone();
+ path.clone_from(&current_dir);
}
}
Err(err) => return Err(err.into()),
diff --git a/ext/node/ops/crypto/mod.rs b/ext/node/ops/crypto/mod.rs
index f39fb6d10..53a3ea3f0 100644
--- a/ext/node/ops/crypto/mod.rs
+++ b/ext/node/ops/crypto/mod.rs
@@ -1424,6 +1424,7 @@ pub const EC_OID: const_oid::ObjectIdentifier =
// }
pub struct PssPrivateKeyParameters<'a> {
pub hash_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
+ #[allow(dead_code)]
pub mask_gen_algorithm: rsa::pkcs8::AlgorithmIdentifierRef<'a>,
pub salt_length: u32,
}
diff --git a/ext/node/ops/crypto/x509.rs b/ext/node/ops/crypto/x509.rs
index eefe1c6d0..8ae7c314d 100644
--- a/ext/node/ops/crypto/x509.rs
+++ b/ext/node/ops/crypto/x509.rs
@@ -63,7 +63,9 @@ pub fn op_node_x509_parse<'s>(
_buf: buf.to_vec(),
// SAFETY: Extending the lifetime of the certificate. Backing buffer is
// owned by the resource.
- cert: unsafe { std::mem::transmute(cert) },
+ cert: unsafe {
+ std::mem::transmute::<X509Certificate<'_>, X509Certificate<'_>>(cert)
+ },
pem,
};
diff --git a/ext/node/ops/os/cpus.rs b/ext/node/ops/os/cpus.rs
index 2e3d2a954..9de4f1ff3 100644
--- a/ext/node/ops/os/cpus.rs
+++ b/ext/node/ops/os/cpus.rs
@@ -106,7 +106,7 @@ pub fn cpu_info() -> Option<Vec<CpuInfo>> {
cpu.times.irq = 0;
- cpu.model = model.clone();
+ cpu.model.clone_from(&model);
cpu.speed = cpu_speed / 1000000;
}
diff --git a/ext/web/lib.rs b/ext/web/lib.rs
index 74ed78c7e..554bad1de 100644
--- a/ext/web/lib.rs
+++ b/ext/web/lib.rs
@@ -28,7 +28,6 @@ use std::cell::RefCell;
use std::fmt;
use std::path::PathBuf;
use std::sync::Arc;
-use std::usize;
use crate::blob::op_blob_create_object_url;
use crate::blob::op_blob_create_part;