mirror of
https://codeberg.org/unspeaker/tek.git
synced 2025-12-06 19:56:42 +01:00
remove edn_ prefix from a couple macros
This commit is contained in:
parent
798de37172
commit
34b35d08be
8 changed files with 25 additions and 25 deletions
|
|
@ -301,7 +301,7 @@ impl<'a, T: Context<'a, U>, U> Context<'a, U> for Option<T> {
|
|||
}
|
||||
}
|
||||
/// Implement `Context` for a context and type.
|
||||
#[macro_export] macro_rules! edn_provide {
|
||||
#[macro_export] macro_rules! provide {
|
||||
// Provide a value to the EDN template
|
||||
($type:ty:|$self:ident:$State:ty|{ $($pat:pat => $expr:expr),* $(,)? }) => {
|
||||
impl<'a> Context<'a, $type> for $State {
|
||||
|
|
@ -324,7 +324,7 @@ impl<'a, T: Context<'a, U>, U> Context<'a, U> for Option<T> {
|
|||
/// Implement `Context` for a context and numeric type.
|
||||
///
|
||||
/// This enables support for numeric literals.
|
||||
#[macro_export] macro_rules! edn_provide_num {
|
||||
#[macro_export] macro_rules! provide_num {
|
||||
// Provide a value that may also be a numeric literal in the EDN, to a generic implementation.
|
||||
($type:ty:|$self:ident:<$T:ident:$Trait:path>|{ $($pat:pat => $expr:expr),* $(,)? }) => {
|
||||
impl<'a, $T: $Trait> Context<'a, $type> for $T {
|
||||
|
|
@ -347,7 +347,7 @@ impl<'a, T: Context<'a, U>, U> Context<'a, U> for Option<T> {
|
|||
/// Implement `Context` for a context and content type.
|
||||
///
|
||||
/// This enables support for layout expressions.
|
||||
#[macro_export] macro_rules! edn_provide_content {
|
||||
#[macro_export] macro_rules! provide_content {
|
||||
(|$self:ident:$State:ty|{ $($pat:pat => $expr:expr),* $(,)? }) => {
|
||||
impl<'a, E: Output> Context<'a, Box<dyn Render<E> + 'a>> for $State {
|
||||
fn get (&'a $self, edn: &'a impl Atom<'a>) -> Option<Box<dyn Render<E> + 'a>> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue