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(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<error::Error>> {
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);