fix example

This commit is contained in:
D. Scott Boggs 2022-12-22 12:29:22 -05:00
parent e5fe0b6b59
commit b232db9f97
1 changed files with 5 additions and 8 deletions

View File

@ -1,17 +1,14 @@
#![cfg_attr(not(feature = "toml"), allow(dead_code))] #![cfg_attr(not(feature = "toml"), allow(dead_code))]
#![cfg_attr(not(feature = "toml"), allow(unused_imports))] #![cfg_attr(not(feature = "toml"), allow(unused_imports))]
#[macro_use]
extern crate pretty_env_logger;
extern crate elefren;
mod register; mod register;
use register::Mastodon; use elefren::Result;
use std::error;
#[cfg(feature = "toml")] #[cfg(feature = "toml")]
fn main() -> Result<(), Box<error::Error>> { #[tokio::main]
let mastodon = register::get_mastodon_data()?; async fn main() -> Result<()> {
let you = mastodon.verify_credentials()?; let mastodon = register::get_mastodon_data().await?;
let you = mastodon.verify_credentials().await?;
println!("{:#?}", you); println!("{:#?}", you);