diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-03-29 23:09:46 +0200 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-03-29 23:09:46 +0200 |
| commit | da65ee39162d0323321340b2a9cef9a013ad36ef (patch) | |
| tree | 127f6afd6bb418c5df3216e1ad83239aa693ef77 /oryxc/src/unistr.rs | |
| parent | db11ea02d777a33fedb6af4ee056e85f52fbb008 (diff) | |
Beginning sema work
Diffstat (limited to 'oryxc/src/unistr.rs')
| -rw-r--r-- | oryxc/src/unistr.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/oryxc/src/unistr.rs b/oryxc/src/unistr.rs index f9ea3d0..9a204cf 100644 --- a/oryxc/src/unistr.rs +++ b/oryxc/src/unistr.rs @@ -1,3 +1,4 @@ +use std::fmt::{self, Display, Formatter}; use std::hash::{ Hash, Hasher, @@ -13,6 +14,12 @@ use unicode_normalization::{ #[derive(Copy, Clone, Debug, Eq)] pub struct UniStr<'a>(pub &'a str); +impl Display for UniStr<'_> { + fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), fmt::Error> { + return self.0.fmt(f); + } +} + impl Hash for UniStr<'_> { fn hash<H: Hasher>(&self, state: &mut H) { /* In the ASCII common case we use .bytes() to avoid decoding |