Skip to content

Paste is dead, long live Pastey #4118

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 10 additions & 4 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ axum = { default-features = false, version = "0.8.4" }
serde_qs = { default-features = false, version = "0.15.0" }
syn = { default-features = false, version = "2.0.101" }
xxhash-rust = { default-features = false, version = "0.8.15" }
paste = { default-features = false, version = "1.0.15" }
pastey = { default-features = false, version = "0.1.0" }
quote = { default-features = false, version = "1.0.40" }
web-sys = { default-features = false, version = "0.3.77" }
js-sys = { default-features = false, version = "0.3.77" }
Expand Down
2 changes: 1 addition & 1 deletion either_of/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ edition.workspace = true

[dependencies]
pin-project-lite = { workspace = true, default-features = true }
paste = { workspace = true, default-features = true }
pastey = { workspace = true, default-features = true }

[features]
default = ["no_std"]
Expand Down
2 changes: 1 addition & 1 deletion either_of/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ use core::{
pin::Pin,
task::{Context, Poll},
};
use paste::paste;
use pastey::paste;
use pin_project_lite::pin_project;
#[cfg(not(feature = "no_std"))]
use std::error::Error; // TODO: replace with core::error::Error once MSRV is >= 1.81.0
Expand Down
2 changes: 1 addition & 1 deletion leptos/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ leptos_config = { workspace = true }
leptos-spin-macro = { optional = true , workspace = true, default-features = true }
oco_ref = { workspace = true }
or_poisoned = { workspace = true }
paste = { workspace = true, default-features = true }
pastey = { workspace = true, default-features = true }
rand = { optional = true , workspace = true, default-features = true }
# NOTE: While not used directly, `getrandom`'s `wasm_js` feature is needed when `rand` is used on WASM to
# avoid a compilation error
Expand Down
4 changes: 2 additions & 2 deletions leptos/src/callback.rs
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ macro_rules! impl_unsync_callable_from_fn {
$($arg: 'static,)*
{
fn from(f: F) -> Self {
paste::paste!(
pastey::paste!(
Self::new(move |($([<$arg:lower>],)*)| f($([<$arg:lower>]),*).into())
)
}
Expand Down Expand Up @@ -217,7 +217,7 @@ macro_rules! impl_callable_from_fn {
$($arg: Send + Sync + 'static,)*
{
fn from(f: F) -> Self {
paste::paste!(
pastey::paste!(
Self::new(move |($([<$arg:lower>],)*)| f($([<$arg:lower>]),*).into())
)
}
Expand Down
2 changes: 1 addition & 1 deletion reactive_stores/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ edition.workspace = true
guardian = { workspace = true, default-features = true }
itertools = { workspace = true , default-features = true }
or_poisoned = { workspace = true }
paste = { workspace = true, default-features = true }
pastey = { workspace = true, default-features = true }
reactive_graph = { workspace = true }
rustc-hash = { workspace = true, default-features = true }
reactive_stores_macro = { workspace = true }
Expand Down
2 changes: 1 addition & 1 deletion reactive_stores/src/patch.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ macro_rules! patch_tuple {
let mut new_path = path.to_owned();
new_path.push(0);

paste::paste! {
pastey::paste! {
#[allow(non_snake_case)]
let ($($ty,)*) = self;
let ($([<new_ $ty:lower>],)*) = new;
Expand Down
2 changes: 1 addition & 1 deletion tachys/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ reactive_stores = { workspace = true, optional = true }
slotmap = { optional = true, workspace = true, default-features = true }
oco_ref = { workspace = true, optional = true }
async-trait = { workspace = true, default-features = true }
paste = { workspace = true, default-features = true }
pastey = { workspace = true, default-features = true }
erased = { workspace = true, default-features = true }
wasm-bindgen = { workspace = true, default-features = true }
html-escape = { workspace = true, default-features = true }
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/html/attribute/global.rs
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ where

macro_rules! on_definitions {
($(#[$meta:meta] $key:ident $html:literal),* $(,)?) => {
paste::paste! {
pastey::paste! {
$(
#[doc = concat!("Adds the HTML `", $html, "` attribute to the element.\n\n**Note**: This is the HTML attribute, which takes a JavaScript string, not an `on:` listener that takes application logic written in Rust.")]
#[track_caller]
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/html/attribute/key.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ pub trait AttributeKey: Clone + Send + 'static {

macro_rules! attributes {
($(#[$meta:meta] $key:ident $html:literal),* $(,)?) => {
paste::paste! {
pastey::paste! {
$(
#[$meta]
#[track_caller]
Expand Down
4 changes: 2 additions & 2 deletions tachys/src/html/attribute/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ macro_rules! impl_attr_for_tuples {
}

fn rebuild(self, state: &mut Self::State) {
paste::paste! {
pastey::paste! {
let ([<$first:lower>], $([<$ty:lower>],)*) = self;
let ([<view_ $first:lower>], $([<view_ $ty:lower>],)*) = state;
[<$first:lower>].rebuild([<view_ $first:lower>]);
Expand Down Expand Up @@ -421,7 +421,7 @@ macro_rules! impl_attr_for_tuples_truncate_additional {
}

fn rebuild(self, state: &mut Self::State) {
paste::paste! {
pastey::paste! {
let ([<$first:lower>], $([<$ty:lower>],)*) = self;
let ([<view_ $first:lower>], $([<view_ $ty:lower>],)*) = state;
[<$first:lower>].rebuild([<view_ $first:lower>]);
Expand Down
6 changes: 3 additions & 3 deletions tachys/src/html/element/elements.rs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ macro_rules! html_element_inner {
[$($attr:ty),*]
$escape:literal
) => {
paste::paste! {
pastey::paste! {
#[$meta]
#[track_caller]
pub fn $tag() -> HtmlElement<$struct_name, (), ()>
Expand Down Expand Up @@ -102,7 +102,7 @@ macro_rules! html_elements {
),*
$(,)?
) => {
paste::paste! {
pastey::paste! {
$(html_element_inner! {
#[$meta]
$tag
Expand All @@ -122,7 +122,7 @@ macro_rules! html_self_closing_elements {
),*
$(,)?
) => {
paste::paste! {
pastey::paste! {
$(
#[$meta]
#[track_caller]
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/html/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -511,7 +511,7 @@ macro_rules! generate_event_types {
$( #[$does_not_bubble:ident] )?
$( $event:ident )+ : $web_event:ident
),* $(,)?} => {
::paste::paste! {
::pastey::paste! {
$(
#[doc = "The `" [< $($event)+ >] "` event, which receives [" $web_event "](web_sys::" $web_event ") as its argument."]
#[derive(Copy, Clone, Debug)]
Expand Down
4 changes: 2 additions & 2 deletions tachys/src/mathml/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ use std::fmt::Debug;

macro_rules! mathml_global {
($tag:ty, $attr:ty) => {
paste::paste! {
pastey::paste! {
/// A MathML attribute.
pub fn $attr<V>(self, value: V) -> HtmlElement <
[<$tag:camel>],
Expand Down Expand Up @@ -42,7 +42,7 @@ macro_rules! mathml_global {

macro_rules! mathml_elements {
($($tag:ident [$($attr:ty),*]),* $(,)?) => {
paste::paste! {
pastey::paste! {
$(
// `tag()` function
/// A MathML element.
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/svg/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ use std::{borrow::Cow, fmt::Debug};

macro_rules! svg_elements {
($($tag:ident [$($attr:ty),*]),* $(,)?) => {
paste::paste! {
pastey::paste! {
$(
/// An SVG element.
// `tag()` function
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/view/either.rs
Original file line number Diff line number Diff line change
Expand Up @@ -720,7 +720,7 @@ where

macro_rules! tuples {
($num:literal => $($ty:ident),*) => {
paste::paste! {
pastey::paste! {
#[doc = concat!("Retained view state for ", stringify!([<EitherOf $num>]), ".")]
pub struct [<EitherOf $num State>]<$($ty,)*>
where
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/view/primitives.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ use std::{
macro_rules! render_primitive {
($($child_type:ty),* $(,)?) => {
$(
paste::paste! {
pastey::paste! {
pub struct [<$child_type:camel State>](crate::renderer::types::Text, $child_type);

impl Mountable for [<$child_type:camel State>] {
Expand Down
2 changes: 1 addition & 1 deletion tachys/src/view/tuples.rs
Original file line number Diff line number Diff line change
Expand Up @@ -250,7 +250,7 @@ macro_rules! impl_view_for_tuples {
}

fn rebuild(self, state: &mut Self::State) {
paste::paste! {
pastey::paste! {
let ([<$first:lower>], $([<$ty:lower>],)*) = self;
let ([<view_ $first:lower>], $([<view_ $ty:lower>],)*) = state;
[<$first:lower>].rebuild([<view_ $first:lower>]);
Expand Down
Loading