Skip to content

Commit

Permalink
Remove special casing on primitive types by casting 0 to type (#3)
Browse files Browse the repository at this point in the history
  • Loading branch information
airblast-dev authored Jan 22, 2024
1 parent 402a0f2 commit ae09191
Showing 1 changed file with 1 addition and 13 deletions.
14 changes: 1 addition & 13 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -254,20 +254,8 @@ macro_rules! concat_slices {
$crate::_concat_slices!([$init; $T]: $($s),*)
};

([char]: $($s:expr),* $(,)?) => {
$crate::concat_slices!(['\x00'; char]: $($s),*)
};

([f32]: $($s:expr),* $(,)?) => {
$crate::concat_slices!([0.0; f32]: $($s),*)
};

([f64]: $($s:expr),* $(,)?) => {
$crate::concat_slices!([0.0; f64]: $($s),*)
};

([$T:ty]: $($s:expr),* $(,)?) => {
$crate::concat_slices!([0; $T]: $($s),*)
$crate::concat_slices!([0 as $T; $T]: $($s),*)
};
}

Expand Down

0 comments on commit ae09191

Please sign in to comment.