diff options
author | Paul Woolcock <paul@woolcock.us> | 2018-10-10 05:27:28 -0400 |
---|---|---|
committer | Paul Woolcock <paul@woolcock.us> | 2018-10-10 10:28:22 -0400 |
commit | e6879ec8eaa3add8f187a64b7216fdae41624cc5 (patch) | |
tree | 470c0383a73bb2741e39960ee828a6c705162e15 | |
parent | 4dd40422b3de11aaadcfc600317c0df3556b38f5 (diff) |
change up examples slightly
-rw-r--r-- | Cargo.toml | 1 | ||||
-rw-r--r-- | examples/follow_profile.rs | 4 | ||||
-rw-r--r--[-rwxr-xr-x] | examples/follows_me.rs | 4 | ||||
-rw-r--r-- | examples/home_timeline.rs | 3 | ||||
-rw-r--r-- | examples/print_your_profile.rs | 3 | ||||
-rw-r--r-- | examples/register/mod.rs (renamed from examples/register.rs) | 7 | ||||
-rw-r--r-- | examples/search.rs | 3 | ||||
-rw-r--r-- | examples/upload_photo.rs | 3 |
8 files changed, 22 insertions, 6 deletions
@@ -40,6 +40,7 @@ skeptic = "0.13.3" skeptic = "0.13.3" tempfile = "3.0.3" indoc = "0.2.6" +pretty_env_logger = "0.2.4" [package.metadata.docs.rs] features = ["all"] diff --git a/examples/follow_profile.rs b/examples/follow_profile.rs index 9e589d2..84b2998 100644 --- a/examples/follow_profile.rs +++ b/examples/follow_profile.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; @@ -12,7 +15,6 @@ fn main() -> Result<(), Box<error::Error>> { let new_follow = mastodon.follow(input.trim())?; println!("{:#?}", new_follow); - Ok(()) } diff --git a/examples/follows_me.rs b/examples/follows_me.rs index c423b1c..0df4414 100755..100644 --- a/examples/follows_me.rs +++ b/examples/follows_me.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; @@ -22,4 +25,3 @@ fn main() { --example print_your_profile --features toml\n" ); } - diff --git a/examples/home_timeline.rs b/examples/home_timeline.rs index 48da6f4..46519e3 100644 --- a/examples/home_timeline.rs +++ b/examples/home_timeline.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; diff --git a/examples/print_your_profile.rs b/examples/print_your_profile.rs index 5492648..cbcd372 100644 --- a/examples/print_your_profile.rs +++ b/examples/print_your_profile.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; diff --git a/examples/register.rs b/examples/register/mod.rs index d6a2275..d8dbaff 100644 --- a/examples/register.rs +++ b/examples/register/mod.rs @@ -1,14 +1,13 @@ #![cfg_attr(not(feature = "toml"), allow(dead_code))] #![cfg_attr(not(feature = "toml"), allow(unused_imports))] -extern crate elefren; -pub use self::elefren::prelude::*; +pub use elefren::prelude::*; use std::{error::Error, io}; -use self::elefren::helpers::cli; +use elefren::helpers::cli; #[cfg(feature = "toml")] -use self::elefren::helpers::toml; +use elefren::helpers::toml; #[allow(dead_code)] #[cfg(feature = "toml")] diff --git a/examples/search.rs b/examples/search.rs index a918c58..ec13f6d 100644 --- a/examples/search.rs +++ b/examples/search.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; diff --git a/examples/upload_photo.rs b/examples/upload_photo.rs index f75df7d..a2e6688 100644 --- a/examples/upload_photo.rs +++ b/examples/upload_photo.rs @@ -1,5 +1,8 @@ #![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::MastodonClient; |