Skip to content

Commit 5dd2be3

Browse files
committed
Make {tablet, tablet_tool}::Info non-exhaustive
Almost forgot! Important for forwards-compatibility, e.g. this new bus type thing on tablet which I haven’t added yet.
1 parent 7d7f20d commit 5dd2be3

File tree

2 files changed

+2
-0
lines changed

2 files changed

+2
-0
lines changed

src/seat/tablet.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ pub trait Handler: Sized {
3333

3434
/// The description of a tablet device.
3535
#[derive(Debug, Default)]
36+
#[non_exhaustive]
3637
pub struct Info {
3738
/// The descriptive name of the tablet device.
3839
pub name: Option<String>,

src/seat/tablet_tool.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,7 @@ const HARDWARE_ID_WACOM: Capabilities = Capabilities::from_bits_retain(0b1000000
5555

5656
/// Static information about the tool and its capabilities.
5757
#[derive(Clone, PartialEq, Eq)]
58+
#[non_exhaustive]
5859
pub struct Info {
5960
// Wish this was #[repr(u8)]… it’s wasting four bytes.
6061
r#type: Type,

0 commit comments

Comments
 (0)