LemmyNet/activitypub-federation-rust

Error when trying to use ObjectId::parse

maksalees opened this issue · 2 comments

When I try to ObjectId::<ApUser>::parse(user.ap_id.into()), I get this

ObjectId::<ApUser>::parse(user.ap_id.into())
   |                 -------------------------------- ^^^^^^^^^^^^^^^ the trait `From<Infallible>` is not implemented for `url::ParseError`
   |                 |
   |                 required by a bound introduced by this call

user.ap_id have String type and contains ActivityPub ID of object.

Looks like a problem with handling the error. It should compile if you put unwrap() at the end.

Fixed by #84