Skip to content

Commit

Permalink
Replaced cfg_attr no_std with blanket no_std and extern crate in test…
Browse files Browse the repository at this point in the history
…s module
  • Loading branch information
asasine committed Jun 7, 2024
1 parent 125acdd commit 093ea31
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
//! contains detailed information about the sensor's features, electrical characteristics, and registers. This package
//! implements the functionality described in the datasheet and references the relevant sections in the documentation.
#![cfg_attr(not(test), no_std)]
#![no_std]

use defmt::{debug, trace, Format};
use embedded_hal_async::{delay::DelayNs, i2c::I2c};
Expand Down Expand Up @@ -692,6 +692,9 @@ where

#[cfg(test)]
mod tests {
extern crate std;
use std::prelude::rust_2021::*;
use std::vec;
use embedded_hal_mock::eh1::delay::{CheckedDelay, NoopDelay, Transaction as DelayTransaction};
use embedded_hal_mock::eh1::i2c::{Mock, Transaction as I2cTransaction};
use uom::ConstZero;
Expand Down

0 comments on commit 093ea31

Please sign in to comment.