1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-07 20:24:01 +00:00

Clean up more COM

This commit is contained in:
Isaiah Inuwa
2025-11-24 07:29:45 -06:00
parent 2f7281eef8
commit 6b2ba80d6a
2 changed files with 3 additions and 16 deletions

View File

@@ -1,5 +1,7 @@
//! Functions for interacting with Windows COM.
#[allow(non_snake_case)]
#![allow(non_snake_case)]
#![allow(non_camel_case_types)]
use std::{
alloc,
mem::MaybeUninit,

View File

@@ -61,9 +61,6 @@ pub(super) fn free_webauthn_lib(library: HMODULE) -> Result<(), WinWebAuthnError
}
pub(super) trait WindowsString {
fn to_utf16(&self) -> Vec<u16>;
// Copies a string to a buffer from the OLE allocator
// fn to_com_utf16(&self) -> (*mut u16, u32);
}
impl WindowsString for str {
@@ -71,18 +68,6 @@ impl WindowsString for str {
// null-terminated UTF-16
self.encode_utf16().chain(std::iter::once(0)).collect()
}
/*
fn to_com_utf16(&self) -> (*mut u16, u32) {
let wide_bytes: Vec<u8> = self
.to_utf16()
.into_iter()
.flat_map(|x| x.to_le_bytes())
.collect();
let (ptr, byte_count) = ComBuffer::from_buffer(&wide_bytes);
(ptr as *mut u16, byte_count)
}
*/
}
pub struct ArrayPointerIterator<'a, T> {