From d6978e00552ecf7c661a2df71b14368f0efe6b75 Mon Sep 17 00:00:00 2001 From: Vika Date: Fri, 22 Jul 2022 09:37:51 +0300 Subject: kittybox-indieauth: fix AuthorizationRequest doctest --- kittybox-rs/indieauth/src/lib.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'kittybox-rs/indieauth') diff --git a/kittybox-rs/indieauth/src/lib.rs b/kittybox-rs/indieauth/src/lib.rs index 826da4e..1f84270 100644 --- a/kittybox-rs/indieauth/src/lib.rs +++ b/kittybox-rs/indieauth/src/lib.rs @@ -240,7 +240,7 @@ impl axum_core::response::IntoResponse for Profile { pub struct State(String); impl State { /// Generate a random state string of 128 bytes in length. - fn new() -> Self { + pub fn new() -> Self { use rand::{Rng, distributions::Alphanumeric}; let bytes = rand::thread_rng() .sample_iter(&Alphanumeric) @@ -256,6 +256,7 @@ impl State { /// ```rust /// use kittybox_indieauth::{ /// AuthorizationRequest, ResponseType, State, +/// Scopes, Scope, /// PKCEChallenge, PKCEVerifier, PKCEMethod /// }; /// @@ -276,7 +277,7 @@ impl State { /// .parse() /// .unwrap(); /// -/// authorization_endpoint.set_query(serde_urlencoded::to_string(request).unwrap()); +/// url.set_query(Some(&serde_urlencoded::to_string(request).unwrap())); /// /// // Open a user's browser to navigate to the authorization endpoint page... /// ``` -- cgit 1.4.1