Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feedback
Browse files Browse the repository at this point in the history
kennykerr committed Feb 19, 2024
1 parent c44433b commit 023c99c
Showing 4 changed files with 11 additions and 11 deletions.
2 changes: 1 addition & 1 deletion crates/libs/bindgen/src/rust/constants.rs
Original file line number Diff line number Diff line change
@@ -41,7 +41,7 @@ pub fn writer(writer: &Writer, def: metadata::Field) -> TokenStream {
if underlying_type == constant_type {
if ty == metadata::Type::HRESULT {
if let metadata::Value::I32(signed) = constant.value() {
value = format!("0x{:X}u32 as _", signed).into();
value = format!("0x{:X}_u32 as _", signed).into();
}
}
} else {
14 changes: 7 additions & 7 deletions crates/libs/core/src/imp/com_bindings.rs
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@ impl ::core::fmt::Debug for AgileReferenceOptions {
f.debug_tuple("AgileReferenceOptions").field(&self.0).finish()
}
}
pub const CO_E_NOTINITIALIZED: ::windows_core::HRESULT = ::windows_core::HRESULT(0x800401F0u32 as _);
pub const CO_E_NOTINITIALIZED: ::windows_core::HRESULT = ::windows_core::HRESULT(0x800401F0_u32 as _);
#[repr(C)]
pub struct DateTime {
pub UniversalTime: i64,
@@ -61,9 +61,9 @@ impl ::core::default::Default for DateTime {
unsafe { ::core::mem::zeroed() }
}
}
pub const E_BOUNDS: ::windows_core::HRESULT = ::windows_core::HRESULT(0x8000000Bu32 as _);
pub const E_NOINTERFACE: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80004002u32 as _);
pub const E_OUTOFMEMORY: ::windows_core::HRESULT = ::windows_core::HRESULT(0x8007000Eu32 as _);
pub const E_BOUNDS: ::windows_core::HRESULT = ::windows_core::HRESULT(0x8000000B_u32 as _);
pub const E_NOINTERFACE: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80004002_u32 as _);
pub const E_OUTOFMEMORY: ::windows_core::HRESULT = ::windows_core::HRESULT(0x8007000E_u32 as _);
::windows_core::imp::com_interface!(IAgileObject, IAgileObject_Vtbl, 0x94ea2b94_e9cc_49e0_c0ff_ee64ca8f5b90);
::windows_core::imp::interface_hierarchy!(IAgileObject, ::windows_core::IUnknown);
impl IAgileObject {}
@@ -696,7 +696,7 @@ pub struct IWeakReferenceSource_Vtbl {
pub base__: ::windows_core::IUnknown_Vtbl,
pub GetWeakReference: unsafe extern "system" fn(*mut ::core::ffi::c_void, *mut *mut ::core::ffi::c_void) -> ::windows_core::HRESULT,
}
pub const JSCRIPT_E_CANTEXECUTE: ::windows_core::HRESULT = ::windows_core::HRESULT(0x89020001u32 as _);
pub const JSCRIPT_E_CANTEXECUTE: ::windows_core::HRESULT = ::windows_core::HRESULT(0x89020001_u32 as _);
#[repr(C)]
pub struct Point {
pub X: f32,
@@ -1035,7 +1035,7 @@ impl PropertyValue {
impl ::windows_core::RuntimeName for PropertyValue {
const NAME: &'static str = "Windows.Foundation.PropertyValue";
}
pub const RPC_E_DISCONNECTED: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80010108u32 as _);
pub const RPC_E_DISCONNECTED: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80010108_u32 as _);
#[repr(C)]
pub struct Rect {
pub X: f32,
@@ -1104,7 +1104,7 @@ impl ::core::default::Default for Size {
unsafe { ::core::mem::zeroed() }
}
}
pub const TYPE_E_TYPEMISMATCH: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80028CA0u32 as _);
pub const TYPE_E_TYPEMISMATCH: ::windows_core::HRESULT = ::windows_core::HRESULT(0x80028CA0_u32 as _);
#[repr(C)]
pub struct TimeSpan {
pub Duration: i64,
4 changes: 2 additions & 2 deletions crates/libs/result/src/bindings.rs
Original file line number Diff line number Diff line change
@@ -20,8 +20,8 @@ pub type BOOL = i32;
pub type BSTR = *const u16;
pub const ERROR_INVALID_DATA: WIN32_ERROR = 13u32;
pub const ERROR_NO_UNICODE_TRANSLATION: WIN32_ERROR = 1113u32;
pub const E_INVALIDARG: HRESULT = 0x80070057u32 as _;
pub const E_UNEXPECTED: HRESULT = 0x8000FFFFu32 as _;
pub const E_INVALIDARG: HRESULT = 0x80070057_u32 as _;
pub const E_UNEXPECTED: HRESULT = 0x8000FFFF_u32 as _;
pub const FORMAT_MESSAGE_ALLOCATE_BUFFER: FORMAT_MESSAGE_OPTIONS = 256u32;
pub const FORMAT_MESSAGE_FROM_SYSTEM: FORMAT_MESSAGE_OPTIONS = 4096u32;
pub const FORMAT_MESSAGE_IGNORE_INSERTS: FORMAT_MESSAGE_OPTIONS = 512u32;
2 changes: 1 addition & 1 deletion crates/tests/standalone/src/b_constant_types.rs
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
clippy::all
)]
pub const CMC_ADD_ATTRIBUTES: PCSTR = 63i32 as _;
pub const E_ACCESSDENIED: HRESULT = 0x80070005u32 as _;
pub const E_ACCESSDENIED: HRESULT = 0x80070005_u32 as _;
pub type HRESULT = i32;
pub const IDC_UPARROW: PCWSTR = 32516u16 as _;
pub type PCSTR = *const u8;

0 comments on commit 023c99c

Please sign in to comment.