This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.
Closed
Description
opened on Oct 9, 2019
#[com_interface(EFF8970E-C50F-45E0-9284-291CE5A6F771)]
pub trait IAnimal: IUnknown { … }
This makes me uncomfortable. I’m half-expecting a formatter to reformat the GUID as EFF8970E - C50F -45E0 -9284 -291CE5A6F771
or similar (rustfmt won’t now but could conceivably in the future), and some syntax highlighters will highlight parts of it differently, e.g. “9284” as a number but the rest not. Also, if lower-case hex is used (no idea whether it’s supported in theory or not), then some GUIDs will fail to tokenise, e.g. segments 0bd5
and 1ef3
won’t compile (invalid binary literal and invalid exponent, respectively).
I would prefer the GUID to be a string:
#[com_interface("EFF8970E-C50F-45E0-9284-291CE5A6F771")]
pub trait IAnimal: IUnknown { … }
#[com_interface = "…"]
would also work.
Activity