rust: Allow for usage in no_std environment (#6989)

This commit is contained in:
Marcin Witkowski
2022-01-20 17:49:02 +01:00
committed by GitHub
parent d7b75417fc
commit aff818cebf
14 changed files with 70 additions and 40 deletions

View File

@@ -17,9 +17,9 @@
use crate::follow::Follow;
use crate::vector::VectorIter;
use crate::EndianScalar;
use std::fmt::{Debug, Formatter, Result};
use std::marker::PhantomData;
use std::mem::size_of;
use core::fmt::{Debug, Formatter, Result};
use core::marker::PhantomData;
use core::mem::size_of;
#[derive(Copy, Clone)]
pub struct Array<'a, T: 'a, const N: usize>(&'a [u8], PhantomData<T>);