We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c66a712 commit 5af65daCopy full SHA for 5af65da
1 file changed
libcc2rs/src/reinterpret.rs
@@ -8,16 +8,25 @@ pub trait ByteRepr: 'static {
8
where
9
Self: Sized,
10
{
11
- std::mem::size_of::<Self>()
+ panic!(
12
+ "byte_size is not implemented for {}",
13
+ std::any::type_name::<Self>()
14
+ )
15
}
16
fn to_bytes(&self, _buf: &mut [u8]) {
- panic!("ByteRepr not supported for this type");
17
18
+ "to_bytes is not implemented for {}",
19
20
21
22
fn from_bytes(_buf: &[u8]) -> Self
23
24
25
26
27
+ "from_bytes is not implemented for {}",
28
29
30
31
32
0 commit comments