-
Notifications
You must be signed in to change notification settings - Fork 59
Make Seq generic #57
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
Make Seq generic #57
Conversation
Attribute Also, can you please squash the commits into single commit, the intermediate two commits don't compile by themselves. You can keep the example diff in separate commit if you prefer to. Trying to see if we can replace traits One and Zero. Any ideas ? |
@@ -2,49 +2,49 @@ extern crate libc; | |||
|
|||
use std::fmt; | |||
use std::default::Default; | |||
use self::libc::{c_double}; | |||
use std::num::{One, Zero}; | |||
|
|||
/// Sequences are used for indexing Arrays | |||
#[derive(Copy, Clone)] | |||
#[repr(C)] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Would you even need this anymore necessarily?
@jnicholls Sure, implementing the trait ourselves is one option. |
I updated it to implement the |
} | ||
|
||
impl Zero for u8 { fn zero() -> Self { 0 } } | ||
impl Zero for u16 { fn zero() -> Self { 0 } } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Boo, macro! :)
Alright, macros for @jnicholls :) |
👍 |
Excellent! :) |
No description provided.