Skip to content

Commit ac441a6

Browse files
fix:remove unused memcpy function (#406)
Co-authored-by: Eugene <inbox@null.page>
1 parent 785cfbf commit ac441a6

File tree

3 files changed

+1
-18
lines changed

3 files changed

+1
-18
lines changed

cryptovec/src/platform/wasm.rs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -13,13 +13,3 @@ pub fn memset(ptr: *mut u8, value: i32, size: usize) {
1313
std::ptr::write_bytes(ptr, byte_value, size);
1414
}
1515
}
16-
17-
pub fn memcpy(dest: *mut u32, src: *const u8, size: usize) {
18-
unsafe {
19-
// Convert dest to *mut u8 for byte-wise copying
20-
let dest_bytes = dest as *mut u8;
21-
22-
// Use std::ptr::copy_nonoverlapping to copy the data
23-
std::ptr::copy_nonoverlapping(src, dest_bytes, size);
24-
}
25-
}

cryptovec/src/platform/windows.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,3 @@ pub fn memset(ptr: *mut u8, value: i32, size: usize) {
2121
libc::memset(ptr as *mut c_void, value, size);
2222
}
2323
}
24-
25-
pub fn memcpy(dest: *mut u32, src: *const u8, size: usize) {
26-
unsafe {
27-
libc::memcpy(dest as *mut c_void, src as *const c_void, size);
28-
}
29-
}

russh-keys/src/lib.rs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,11 +80,10 @@ mod format;
8080
#[doc(hidden)]
8181
pub mod helpers;
8282
pub use format::*;
83-
pub use ssh_key::{self, Algorithm, Certificate, EcdsaCurve, HashAlg, PrivateKey, PublicKey};
84-
8583
// Reexports
8684
pub use signature;
8785
pub use ssh_encoding;
86+
pub use ssh_key::{self, Algorithm, Certificate, EcdsaCurve, HashAlg, PrivateKey, PublicKey};
8887

8988
/// OpenSSH agent protocol implementation
9089
pub mod agent;

0 commit comments

Comments
 (0)