LemmyNet / activitypub-federation-rust

High-level Rust library for the Activitypub protocol
GNU Affero General Public License v3.0
409 stars 46 forks source link

Error when trying to use ObjectId::parse #70

Closed maksalees closed 9 months ago

maksalees commented 1 year ago

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.

Nutomic commented 1 year ago

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

Nutomic commented 9 months ago

Fixed by https://github.com/LemmyNet/activitypub-federation-rust/pull/84