Skip to content

Commit

Permalink
Update lib.rs
Browse files Browse the repository at this point in the history
  • Loading branch information
yulmwu committed Sep 25, 2022
1 parent 01715fb commit 06643a8
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ pub mod monad {
}

/// # Implementing a trait for a type with macro
///
///
/// Implement a repeated `impl` using a `macro_rules`.
pub mod impl_macro {
/// `Foo` trait, generic `T`
Expand All @@ -119,7 +119,7 @@ pub mod impl_macro {
$(
impl Foo<$t> for MyStruct<$t> {
type Output = $t;

fn foo(&self, x: $t) -> Self::Output {
self.0 + x
}
Expand All @@ -136,7 +136,6 @@ pub mod impl_macro {
pub fn x() -> impl Foo<usize, Output = usize> {
MyStruct(42)
}

}

#[macro_export]
Expand Down

0 comments on commit 06643a8

Please sign in to comment.