-
Notifications
You must be signed in to change notification settings - Fork 87
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
feat/rgb-color #437
feat/rgb-color #437
Conversation
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.
[[example]] | ||
name = "interactive" | ||
path = "example/interactive.rs" | ||
required-features = ["derive"] |
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.
I was thinking you're new in rust,
you had figured it pretty fast 😄
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.
It's been misspelled "examples/interactive.rs"
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.
Ah crap, since you've already merged it, do I commit on my branch and create a new pull request with the changes?
I was thinking you're new in rust
Lol, this is the first library I'm actually contributing to, thanks for the help and patience:). The things you wrote was actually my reference.
|
||
const CLEAR: &str = "\u{1b}[2J"; | ||
|
||
type Step = Box<dyn Fn(&mut Table) -> (u64, &mut Table)>; |
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.
Ahh kind of hard to understand right?)
Probably will need to refactor it afterall
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.
I agree. I could put the steps in its own struct to try and make it a little bit cleaner if that's what you meant.
Like:
struct StepResult {
// could have `Duration` directly here instead of `u64` milliseconds
duration: u64,
table: &mut Table,
}
struct Step {
action: Box<dyn Fn(&mut Table) -> StepResult>
}
Not sure if this is syntactically correct, I haven't tried it.
And thanks for example |
ref #435