Skip to content

Commit

Permalink
feat: IsCallable::provide_first_argument_cloned
Browse files Browse the repository at this point in the history
  • Loading branch information
EqualMa committed Dec 19, 2023
1 parent 758d4b7 commit 173aeb3
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions src/traits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,20 @@ pub trait IsCallable {
last_argument: argument::Cloned(last_argument),
}
}

fn provide_first_argument_cloned<T: Clone>(
self,
first_argument: T,
) -> super::argument::FirstArgumentProvided<Self, argument::Cloned<T>>
where
Self: Sized + CallableWithFixedArguments,
Self::FixedArgumentTypes: argument::ArgumentTypes<First = argument::Value<T>>,
{
super::argument::FirstArgumentProvided {
f: self,
first_argument: argument::Cloned(first_argument),
}
}
}

/// Anything implementing CallableOne has the following traits:
Expand Down

0 comments on commit 173aeb3

Please sign in to comment.