Skip to content

Commit

Permalink
Remove Key::to_borrowed_str
Browse files Browse the repository at this point in the history
Key::as_str can be used instead.
  • Loading branch information
Thomasdezeeuw committed Aug 29, 2023
1 parent 0c80af3 commit e6b6bde
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions src/kv/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,12 +48,6 @@ impl<'k> Key<'k> {
pub fn as_str(&self) -> &str {
self.key
}

/// Try get a string borrowed for the `'k` lifetime from this key.
pub fn to_borrowed_str(&self) -> Option<&'k str> {
// NOTE: This API leaves room for keys to be owned
Some(self.key)
}
}

impl<'k> fmt::Display for Key<'k> {
Expand Down

0 comments on commit e6b6bde

Please sign in to comment.