From b232db9f979d32b2649f3ef611bf5808bc302396 Mon Sep 17 00:00:00 2001 From: "D. Scott Boggs" Date: Thu, 22 Dec 2022 12:29:22 -0500 Subject: [PATCH] fix example --- examples/print_your_profile.rs | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/examples/print_your_profile.rs b/examples/print_your_profile.rs index cae9f6e..2bd388a 100644 --- a/examples/print_your_profile.rs +++ b/examples/print_your_profile.rs @@ -1,17 +1,14 @@ #![cfg_attr(not(feature = "toml"), allow(dead_code))] #![cfg_attr(not(feature = "toml"), allow(unused_imports))] -#[macro_use] -extern crate pretty_env_logger; -extern crate elefren; mod register; -use register::Mastodon; -use std::error; +use elefren::Result; #[cfg(feature = "toml")] -fn main() -> Result<(), Box> { - let mastodon = register::get_mastodon_data()?; - let you = mastodon.verify_credentials()?; +#[tokio::main] +async fn main() -> Result<()> { + let mastodon = register::get_mastodon_data().await?; + let you = mastodon.verify_credentials().await?; println!("{:#?}", you);