From 0555d31595f5d4cfdc1fd5d85ebb91017c08d125 Mon Sep 17 00:00:00 2001 From: j-mendez Date: Sat, 26 Oct 2024 06:10:47 -0400 Subject: [PATCH] chore(lib): add display --- Cargo.lock | 2 +- Cargo.toml | 6 +++--- src/lib.rs | 6 ++++++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 43833b3..fb17c2e 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,7 +4,7 @@ version = 3 [[package]] name = "case_insensitive_string" -version = "0.2.5" +version = "0.2.6" dependencies = [ "compact_str", "serde", diff --git a/Cargo.toml b/Cargo.toml index 9ca8067..4af4fba 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,12 +1,12 @@ [package] name = "case_insensitive_string" -version = "0.2.5" -authors = ["Jeff Mendez "] +version = "0.2.6" +authors = ["Jeff Mendez "] edition = "2021" description = "A case insensitive string struct." license = "MIT" readme = "README.md" -repository = "https://github.com/a11ywatch/case_insensitive_string" +repository = "https://github.com/spider-rs/case_insensitive_string" keywords = ["case-insensitive", "string"] categories = ["config", "data-structures"] include = ["src/*", "LICENSE", "README.md"] diff --git a/src/lib.rs b/src/lib.rs index 2eea10d..69f8da7 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -70,6 +70,12 @@ impl AsRef for CaseInsensitiveString { } } +impl core::fmt::Display for CaseInsensitiveString { + fn fmt(&self, f: &mut core::fmt::Formatter) -> core::fmt::Result { + write!(f, "{}", self.0) + } +} + impl CaseInsensitiveString { /// Creates a `CaseInsensitiveString` slice from any byte slice. ///