Changing the implementation of clone and adding in MultiStr impl for 1-sized arrays
This commit is contained in:
parent
30c3825197
commit
fa7936455f
|
@ -92,12 +92,13 @@ macro_rules! pseudo {
|
|||
|
||||
|
||||
// TODO this is pretty inefficient, it iterates over the token tree one token at a time
|
||||
// TODO this should only work for ::std::clone::Clone::clone
|
||||
#[doc(hidden)]
|
||||
#[macro_export]
|
||||
macro_rules! __internal_clone_split {
|
||||
(($($x:ident)*), $t:ident => $y:expr) => {{
|
||||
$(let $x = ::std::clone::Clone::clone(&$x);)*
|
||||
let $t = ::std::clone::Clone::clone(&$t);
|
||||
$(let $x = $x.clone();)*
|
||||
let $t = $t.clone();
|
||||
$y
|
||||
}};
|
||||
(($($x:ident)*), $t:ident, $($after:tt)*) => {
|
||||
|
|
|
@ -118,7 +118,7 @@ macro_rules! array_multi_strs {
|
|||
};
|
||||
}
|
||||
|
||||
array_multi_strs!(2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32);
|
||||
array_multi_strs!(1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32);
|
||||
|
||||
|
||||
pub trait OptionStr {
|
||||
|
|
Loading…
Reference in New Issue