change up examples slightly

master
Paul Woolcock 6 years ago
parent 4dd40422b3
commit e6879ec8ea
  1. 1
      Cargo.toml
  2. 4
      examples/follow_profile.rs
  3. 4
      examples/follows_me.rs
  4. 3
      examples/home_timeline.rs
  5. 3
      examples/print_your_profile.rs
  6. 7
      examples/register/mod.rs
  7. 3
      examples/search.rs
  8. 3
      examples/upload_photo.rs

@ -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"]

@ -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(())
}

@ -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"
);
}

@ -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;

@ -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;

@ -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")]

@ -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;

@ -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;

Loading…
Cancel
Save