Skip to content

Commit

Permalink
MSRV
Browse files Browse the repository at this point in the history
  • Loading branch information
kennykerr committed Jan 9, 2024
1 parent 1911d1f commit 5e635b0
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
4 changes: 2 additions & 2 deletions crates/libs/core/src/variant.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ impl Drop for PROPVARIANT {
}

impl VARIANT {
pub const fn new() -> Self {
pub fn new() -> Self {
unsafe { std::mem::zeroed() }
}

Expand All @@ -41,7 +41,7 @@ impl VARIANT {
}

impl PROPVARIANT {
pub const fn new() -> Self {
pub fn new() -> Self {
unsafe { std::mem::zeroed() }
}

Expand Down
9 changes: 4 additions & 5 deletions crates/tests/variant/tests/tests.rs
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
use windows_core::*;

const EMPTY_VARIANT: VARIANT = VARIANT::new();
const EMPTY_PROPVARIANT: PROPVARIANT = PROPVARIANT::new();

#[test]
fn test_variant() -> Result<()> {
assert!(EMPTY_VARIANT.is_empty());
let empty: VARIANT = VARIANT::new();
assert!(empty.is_empty());

let v = VARIANT::default();
assert!(v.is_empty());
Expand Down Expand Up @@ -57,7 +55,8 @@ fn test_variant() -> Result<()> {

#[test]
fn test_propvariant() -> Result<()> {
assert!(EMPTY_PROPVARIANT.is_empty());
let empty: PROPVARIANT = PROPVARIANT::new();
assert!(empty.is_empty());

let v = PROPVARIANT::default();
assert!(v.is_empty());
Expand Down

0 comments on commit 5e635b0

Please sign in to comment.