summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorD. Scott Boggs <scott@tams.tech>2022-12-22 12:29:22 -0500
committerD. Scott Boggs <scott@tams.tech>2022-12-23 12:18:03 -0500
commitb232db9f979d32b2649f3ef611bf5808bc302396 (patch)
treeaf47b52b6d35bfe3e619a5ca94013976296e588e
parente5fe0b6b59ec8d9a397eaa09707e5d6ffc972cc7 (diff)
fix example
-rw-r--r--examples/print_your_profile.rs13
1 files 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<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);