Cargo Format

This commit is contained in:
Richard Bradfield 2020-06-02 12:17:59 +01:00
parent 2c5dadba8d
commit 808bc022f3
No known key found for this signature in database
GPG key ID: 0A10CE15CBC4A23F
4 changed files with 60 additions and 59 deletions

View file

@ -96,11 +96,10 @@
#[doc(hidden)]
pub extern crate tt_call;
mod context;
mod interface;
mod join;
mod parse;
mod interface;
mod context;
/// The building block for this crate. Automatically implemented
/// for contexts providing a dependency of type `T`.
@ -113,7 +112,7 @@ pub trait Provide<T> {
/// Implement this trait to provide a convenient syntax for
/// constructing implementations of dependencies.
pub trait Factory<Args=()> {
pub trait Factory<Args = ()> {
type Object;
fn build(args: Args) -> Result<Self::Object, anyhow::Error>;
}

View file

@ -1,4 +1,5 @@
#![recursion_limit="512"]
#![recursion_limit = "512"]
#![allow(clippy::blacklisted_name)]
extern crate aerosol;
#[macro_use]
@ -39,7 +40,9 @@ struct Bar;
impl aerosol::Factory<(Bar,)> for FooFactory {
type Object = Foo;
fn build(_: (Bar,)) -> Result<Foo, anyhow::Error> { Ok(Foo) }
fn build(_: (Bar,)) -> Result<Foo, anyhow::Error> {
Ok(Foo)
}
}
aerosol::define_context!(
@ -50,7 +53,6 @@ aerosol::define_context!(
);
fn main() {
//trace_macros!(true);
//aerosol::test_macro!();
tt_call! {