Skip to content

Commit

Permalink
1. Fix gitmake
Browse files Browse the repository at this point in the history
  • Loading branch information
denisandroid committed Mar 29, 2024
1 parent ce8124e commit b70d945
Showing 1 changed file with 16 additions and 10 deletions.
26 changes: 16 additions & 10 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -91,17 +91,23 @@ fn main() -> Result<(), Box<dyn Error>> {
///
/// Macro for easily copying impl block code for different types.
/// ```rust
/// use std::{error::Error, fmt::Write};
/// use copy_impl::copy_impl;
///
/// struct CustomNum<T>(T);
/// struct UncheckedCustomNum<T>(T);
///
/// copy_impl! {
/// impl (CustomNum<i8>),
/// impl (CustomNum<i16>),
/// impl (CustomNum<i32>),
/// impl (UncheckedCustomNum<i8>),
/// impl (UncheckedCustomNum<i16>) {
/// pub fn write_to(&self, mut w: impl Write) -> Result<(), std::fmt::Error> {
/// write!(w, "{}", self.0)
/// }
/// }
///}
/// impl (CustomNum<i8>),
/// impl (CustomNum<i16>),
/// impl (CustomNum<i32>),
/// impl (UncheckedCustomNum<i8>),
/// impl (UncheckedCustomNum<i16>) {
/// pub fn write_to(&self, mut w: impl Write) -> Result<(), std::fmt::Error> {
/// write!(w, "{}", self.0)
/// }
/// }
/// }
/// ```
#[macro_export]
macro_rules! copy_impl {
Expand Down

0 comments on commit b70d945

Please sign in to comment.