Skip to content
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
2 changes: 1 addition & 1 deletion rmp/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ edition = "2021"
byteorder = { version = "1.4.2", default-features = false }
num-traits = { version = "0.2.14", default-features = false }
# This is macro_only ;)
paste = "1.0"
pastey = "0.1"

[features]
default = ["std"]
Expand Down
4 changes: 2 additions & 2 deletions rmp/src/decode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ macro_rules! read_byteorder_utils {
const SIZE: usize = core::mem::size_of::<$tp>();
let mut buf: [u8; SIZE] = [0u8; SIZE];
self.read_exact_buf(&mut buf).map_err(ValueReadError::InvalidDataRead)?;
Ok(paste::paste! {
Ok(pastey::paste! {
<byteorder::BigEndian as byteorder::ByteOrder>::[<read_ $tp>](&mut buf)
})
}
Expand Down Expand Up @@ -148,7 +148,7 @@ pub trait RmpRead: sealed::Sealed {

macro_rules! wrap_data_funcs_for_compatibility {
($($tp:ident),* $(,)?) => {
$(paste::paste! {
$(pastey::paste! {
#[cfg(feature = "std")]
#[doc(hidden)]
#[deprecated(note = "internal function. rmpv & rmp-serde need to switch to RmpRead")]
Expand Down
2 changes: 1 addition & 1 deletion rmp/src/encode/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ macro_rules! write_byteorder_utils {
fn $name(&mut self, val: $tp) -> Result<(), DataWriteError<Self::Error>> where Self: Sized {
const SIZE: usize = core::mem::size_of::<$tp>();
let mut buf: [u8; SIZE] = [0u8; SIZE];
paste::paste! {
pastey::paste! {
<byteorder::BigEndian as byteorder::ByteOrder>::[<write_ $tp>](&mut buf, val);
}
self.write_bytes(&buf).map_err(DataWriteError)
Expand Down