Skip to content

Commit 58677ea

Browse files
committed
build(deps): remove dependency on memoffset
Signed-off-by: Longbing Zheng <1211998648@qq.com>
1 parent 4bf116e commit 58677ea

File tree

8 files changed

+7
-8
lines changed

8 files changed

+7
-8
lines changed

allwinner-hal/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@ plic = "0.0.2"
2626
embedded-sdmmc = "0.8.1"
2727

2828
[dev-dependencies]
29-
memoffset = "0.8"
3029

3130
[features]
3231
default = ["d1"]

allwinner-hal/src/ccu.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -812,7 +812,7 @@ mod tests {
812812
AxiFactorN, CpuAxiConfig, CpuClockSource, DramBusGating, DramClock, DramClockSource,
813813
FactorP, MbusClock, PeriFactorN, RegisterBlock,
814814
};
815-
use memoffset::offset_of;
815+
use core::mem::offset_of;
816816
#[test]
817817
fn offset_ccu() {
818818
assert_eq!(offset_of!(RegisterBlock, pll_cpu_control), 0x0);

allwinner-hal/src/com.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ impl RegisterBlock {
102102
#[cfg(test)]
103103
mod tests {
104104
use super::RegisterBlock;
105-
use memoffset::offset_of;
105+
use core::mem::offset_of;
106106
#[test]
107107
fn offset_com() {
108108
assert_eq!(offset_of!(RegisterBlock, tmr), 0x0c);

allwinner-hal/src/gpio/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ pub struct PioPow {
5555
#[cfg(test)]
5656
mod tests {
5757
use super::{Eint, PioPow, Port, RegisterBlock};
58-
use memoffset::offset_of;
58+
use core::mem::offset_of;
5959

6060
#[test]
6161
fn offset_gpio() {

allwinner-hal/src/phy.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ impl RegisterBlock {
129129
#[cfg(test)]
130130
mod tests {
131131
use super::{Datx8, RegisterBlock};
132-
use memoffset::offset_of;
132+
use core::mem::offset_of;
133133
#[test]
134134
fn offset_phy() {
135135
assert_eq!(offset_of!(RegisterBlock, lp3mr11), 0x2c);

allwinner-hal/src/smhc/register.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ mod tests {
10541054
Interrupt, InterruptMask, InterruptStateMasked, InterruptStateRaw, NewTimingSet,
10551055
NtsTimingPhase, RegisterBlock, Status, TimeOut, TransferDirection,
10561056
};
1057-
use memoffset::offset_of;
1057+
use core::mem::offset_of;
10581058
#[test]
10591059
fn offset_smhc() {
10601060
assert_eq!(offset_of!(RegisterBlock, global_control), 0x0);

allwinner-hal/src/spi.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -479,7 +479,7 @@ impl<SPI: AsRef<RegisterBlock>, const I: usize, PINS: Pins<I>> embedded_hal::spi
479479
#[cfg(test)]
480480
mod tests {
481481
use super::RegisterBlock;
482-
use memoffset::offset_of;
482+
use core::mem::offset_of;
483483
#[test]
484484
fn offset_spi0() {
485485
assert_eq!(offset_of!(RegisterBlock, ier), 0x10);

allwinner-hal/src/uart.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ impl UartStatus {
380380
#[cfg(test)]
381381
mod tests {
382382
use super::RegisterBlock;
383-
use memoffset::offset_of;
383+
use core::mem::offset_of;
384384
#[test]
385385
fn offset_uart() {
386386
assert_eq!(offset_of!(RegisterBlock, usr), 0x7c);

0 commit comments

Comments
 (0)