From 58bd708ccb67d317d1a5ccbf07dc1c8363cd0d6a Mon Sep 17 00:00:00 2001 From: Dario Nieuwenhuis Date: Mon, 12 Oct 2020 14:05:48 +0200 Subject: [PATCH] Fix build for std --- embassy/Cargo.toml | 2 +- embassy/src/io/error.rs | 4 ++-- embassy/src/lib.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/embassy/Cargo.toml b/embassy/Cargo.toml index 60428f10..7b8e6cfa 100644 --- a/embassy/Cargo.toml +++ b/embassy/Cargo.toml @@ -5,7 +5,7 @@ authors = ["Dario Nieuwenhuis "] edition = "2018" [features] -std = [] +std = ["futures/std"] [dependencies] defmt = "0.1.0" diff --git a/embassy/src/io/error.rs b/embassy/src/io/error.rs index 2f1d4810..ee3263d5 100644 --- a/embassy/src/io/error.rs +++ b/embassy/src/io/error.rs @@ -110,8 +110,8 @@ impl From for Error { } } -#[cfg(feature = "std")] -impl std::error::Error for Error {} +//#[cfg(feature = "std")] +//impl std::error::Error for Error {} /* impl From for Error { diff --git a/embassy/src/lib.rs b/embassy/src/lib.rs index 92ad7742..3b9aa814 100644 --- a/embassy/src/lib.rs +++ b/embassy/src/lib.rs @@ -1,4 +1,4 @@ -#![no_std] +#![cfg_attr(not(feature = "std"), no_std)] #![feature(slice_fill)] #![feature(generic_associated_types)] #![feature(const_fn)]