Skip to content

Community patches roll-up #13

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ homepage = "https://github.com/andersk/enum_primitive-rs"
readme = "README.md"

[dependencies.num-traits]
version = "0.1.32"
default-features = false
version = "^0.1"
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@ wrap your `enum` declaration inside the `enum_from_primitive!` macro.

```rust
#[macro_use] extern crate enum_primitive;
extern crate num;
use num::FromPrimitive;
use enum_primitive::num_traits::FromPrimitive;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum_primitive::FromPrimitive;


enum_from_primitive! {
#[derive(Debug, PartialEq)]
Expand Down
8 changes: 4 additions & 4 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
//! # Example
//!
//! ```
//! #[macro_use] extern crate enum_primitive;
//! extern crate num_traits;
//! use num_traits::FromPrimitive;
//! #[macro_use]
//! extern crate enum_primitive;
//! use enum_primitive::num_traits::FromPrimitive;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

use enum_primitive::FromPrimitive;

//!
//! enum_from_primitive! {
//! #[derive(Debug, PartialEq)]
Expand All @@ -53,7 +53,7 @@
//! ```


extern crate num_traits;
pub extern crate num_traits;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this really necessary to be public? We only need FromPrimitive which is already public.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Noticed the same behavior is done in #11 but I still don't think its needed.


pub use std::option::Option;
pub use num_traits::FromPrimitive;
Expand Down