summaryrefslogtreecommitdiff
path: root/oryxc/src/unistr.rs
diff options
context:
space:
mode:
Diffstat (limited to 'oryxc/src/unistr.rs')
-rw-r--r--oryxc/src/unistr.rs7
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