Skip to content

Commit 945a2dc

Browse files
roblablactrlcctrlv
andcommitted
Support no_std
Co-Authored-By: Fredrick Brennan <[email protected]>
1 parent 49821c7 commit 945a2dc

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

Cargo.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,5 @@ homepage = "https://github.com/andersk/enum_primitive-rs"
1010
readme = "README.md"
1111

1212
[dependencies.num-traits]
13-
version = "^0.1"
13+
version = "0.2"
14+
default-features = false

src/lib.rs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -52,10 +52,11 @@
5252
//! }
5353
//! ```
5454
55+
#![no_std]
5556

5657
extern crate num_traits;
5758

58-
pub use std::option::Option;
59+
pub use core::option::Option;
5960
pub use num_traits::FromPrimitive;
6061

6162
/// Helper macro for internal use by `enum_from_primitive!`.
@@ -75,7 +76,6 @@ macro_rules! enum_from_primitive_impl_ty {
7576

7677
/// Helper macro for internal use by `enum_from_primitive!`.
7778
#[macro_export]
78-
#[macro_use(enum_from_primitive_impl_ty)]
7979
macro_rules! enum_from_primitive_impl {
8080
($name:ident, $( $variant:ident )*) => {
8181
impl $crate::FromPrimitive for $name {
@@ -88,7 +88,6 @@ macro_rules! enum_from_primitive_impl {
8888
/// Wrap this macro around an `enum` declaration to get an
8989
/// automatically generated implementation of `num::FromPrimitive`.
9090
#[macro_export]
91-
#[macro_use(enum_from_primitive_impl)]
9291
macro_rules! enum_from_primitive {
9392
(
9493
$( #[$enum_attr:meta] )*

0 commit comments

Comments
 (0)