all asyncified except for streaming

This commit is contained in:
2021-08-21 13:10:29 +02:00
parent b6b7372ebb
commit c967e59ffb
10 changed files with 175 additions and 566 deletions
+2 -2
View File
@@ -4,7 +4,7 @@ use crate::{errors::Result, registration::Registered, Mastodon};
/// Finishes the authentication process for the given `Registered` object,
/// using the command-line
pub fn authenticate(registration: Registered) -> Result<Mastodon> {
pub async fn authenticate(registration: Registered) -> Result<Mastodon> {
let url = registration.authorize_url()?;
let stdout = io::stdout();
@@ -20,5 +20,5 @@ pub fn authenticate(registration: Registered) -> Result<Mastodon> {
let mut input = String::new();
stdin.read_line(&mut input)?;
let code = input.trim();
registration.complete(code)
registration.complete(code).await
}