Skip to content

Commit

Permalink
remove misleading Object::as_string
Browse files Browse the repository at this point in the history
  • Loading branch information
Heinenen committed Nov 17, 2024
1 parent ea838e2 commit fea3e78
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 fea3e78

Please sign in to comment.