fix example
This commit is contained in:
parent
e5fe0b6b59
commit
b232db9f97
|
@ -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);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue