Skip to content

Commit b89c799

Browse files
authored
chore: implement Display for CursorIcon
This will automatically provide a `ToString` implementation for the `CursorIcon`.
1 parent 2aaf520 commit b89c799

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/lib.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -321,6 +321,12 @@ impl CursorIcon {
321321
}
322322
}
323323

324+
impl core::fmt::Display for CursorIcon {
325+
fn fmt(&self, f: &mut core::fmt::Formatter<'_>) -> core::fmt::Result {
326+
f.write_str(self.name())
327+
}
328+
}
329+
324330
impl core::str::FromStr for CursorIcon {
325331
type Err = CursorIconParseError;
326332

0 commit comments

Comments
 (0)