We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 96fe473 commit b8411f2Copy full SHA for b8411f2
lighthouse-protocol/src/input/event_source.rs
@@ -1,3 +1,5 @@
1
+use std::fmt;
2
+
3
use serde::{Deserialize, Serialize};
4
5
/// An identifier that is unique per client + device combo.
@@ -7,3 +9,12 @@ pub enum EventSource {
7
9
String(String),
8
10
Int(i32),
11
}
12
13
+impl fmt::Display for EventSource {
14
+ fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
15
+ match self {
16
+ EventSource::String(s) => write!(f, "{s}"),
17
+ EventSource::Int(i) => write!(f, "{i}"),
18
+ }
19
20
+}
0 commit comments