Skip to content

Commit

Permalink
chore(lib): add display
Browse files Browse the repository at this point in the history
  • Loading branch information
j-mendez committed Oct 26, 2024
1 parent c15ab2b commit 0555d31
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

6 changes: 3 additions & 3 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
[package]
name = "case_insensitive_string"
version = "0.2.5"
authors = ["Jeff Mendez <jeff@a11ywatch.com>"]
version = "0.2.6"
authors = ["Jeff Mendez <jeff@spider.cloud>"]
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"]
Expand Down
6 changes: 6 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,12 @@ impl AsRef<str> 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.
///
Expand Down

0 comments on commit 0555d31

Please sign in to comment.