Skip to content

Commit

Permalink
remove misleading Object::as_string (#350)
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinenen authored Nov 17, 2024
1 parent ee36ab7 commit f26c50c
Showing 1 changed file with 0 additions and 7 deletions.
7 changes: 0 additions & 7 deletions src/object.rs
Original file line number Diff line number Diff line change
Expand Up @@ -196,13 +196,6 @@ impl Object {
}
}

pub fn as_string(&self) -> Result<std::borrow::Cow<'_, str>> {
match self {
Object::String(string, _) => Ok(std::string::String::from_utf8_lossy(string)),
_ => Err(Error::Type),
}
}

pub fn as_reference(&self) -> Result<ObjectId> {
match *self {
Object::Reference(ref id) => Ok(*id),
Expand Down

0 comments on commit f26c50c

Please sign in to comment.