From 988450c79fc26de2b295284a0de2be4e3febce48 Mon Sep 17 00:00:00 2001 From: Nutomic Date: Tue, 18 Jul 2023 22:10:25 +0200 Subject: [PATCH] Fix tests (#71) --- docs/07_fetching_data.md | 2 +- docs/10_fetching_objects_with_unknown_type.md | 1 + src/traits.rs | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/docs/07_fetching_data.md b/docs/07_fetching_data.md index 05eb7ed..ef19a6a 100644 --- a/docs/07_fetching_data.md +++ b/docs/07_fetching_data.md @@ -34,7 +34,7 @@ We can similarly dereference a user over webfinger with the following method. It # tokio::runtime::Runtime::new().unwrap().block_on(async { # let config = FederationConfig::builder().domain("example.com").app_data(db_connection).build().await?; # let data = config.to_request_data(); -let user: DbUser = webfinger_resolve_actor("nutomic@lemmy.ml", &data).await?; +let user: DbUser = webfinger_resolve_actor("ruud@lemmy.world", &data).await?; # Ok::<(), anyhow::Error>(()) # }).unwrap(); ``` diff --git a/docs/10_fetching_objects_with_unknown_type.md b/docs/10_fetching_objects_with_unknown_type.md index 596c381..f231200 100644 --- a/docs/10_fetching_objects_with_unknown_type.md +++ b/docs/10_fetching_objects_with_unknown_type.md @@ -13,6 +13,7 @@ It is sometimes necessary to fetch from a URL, but we don't know the exact type # use url::Url; # use activitypub_federation::traits::tests::{Person, Note}; +#[derive(Debug)] pub enum SearchableDbObjects { User(DbUser), Post(DbPost) diff --git a/src/traits.rs b/src/traits.rs index c6f8741..c6b329f 100644 --- a/src/traits.rs +++ b/src/traits.rs @@ -22,6 +22,7 @@ use url::Url; /// # use activitypub_federation::traits::tests::{DbConnection, DbUser}; /// # /// /// How the post is read/written in the local database +/// #[derive(Debug)] /// pub struct DbPost { /// pub text: String, /// pub ap_id: ObjectId,