You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
224 B
18 lines
224 B
4 years ago
|
//! Default implementors
|
||
|
use super::*;
|
||
|
|
||
|
macro_rules! collapse {
|
||
|
($ty:ty) => {
|
||
|
impl CollapseMemory for $ty
|
||
|
{
|
||
|
fn as_memory(&self) -> &[u8]
|
||
|
{
|
||
|
self.as_ref()
|
||
|
}
|
||
|
}
|
||
|
};
|
||
|
}
|
||
|
|
||
|
collapse!(str);
|
||
|
collapse!([u8]);
|