Adds a MastodonClient trait
This is useful for user code, which can use the trait to add a layer of indirection to their code, allowing them to swap out implementations for testing
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
mod register;
|
||||
|
||||
use register::MastodonClient;
|
||||
use std::error;
|
||||
|
||||
fn main() -> Result<(), Box<error::Error>> {
|
||||
|
||||
@@ -1,7 +1,9 @@
|
||||
mod register;
|
||||
|
||||
use register::MastodonClient;
|
||||
use std::error;
|
||||
|
||||
|
||||
fn main() -> Result<(), Box<error::Error>> {
|
||||
let mastodon = register::get_mastodon_data()?;
|
||||
let you = mastodon.verify_credentials()?;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
extern crate mammut;
|
||||
extern crate toml;
|
||||
|
||||
pub use self::mammut::MastodonClient;
|
||||
|
||||
use std::{
|
||||
error::Error,
|
||||
fs,
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
mod register;
|
||||
|
||||
use register::MastodonClient;
|
||||
use std::error;
|
||||
|
||||
fn main() -> Result<(), Box<error::Error>> {
|
||||
|
||||
@@ -1,5 +1,6 @@
|
||||
mod register;
|
||||
|
||||
use register::MastodonClient;
|
||||
use std::error;
|
||||
|
||||
fn main() -> Result<(), Box<error::Error>> {
|
||||
|
||||
Reference in New Issue
Block a user