Skip to content
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

Add ScheduleFields, Remove Option from source #75

Merged
merged 1 commit into from
Feb 17, 2021

Conversation

koenichiwa
Copy link
Contributor

Almost the same code as #72 but this time I actually synced my fork. I will close that pull request momentarily. Implementation for #71

The only difference between this pull request and #72 is that ScheduleFields is not exposed now.

Changes are pretty simple. ScheduleFields is a struct that holds all the TimeSpec fields previously found in Schedule. Schedule nouw only holds source: String and fields: ScheduleFields. Due to this change, the source is immediately assigned, and doesn't have to be of type Option<String> anymore.

Last change is that in the trait implementation of Schedule, all instances of self.years (etc.) are changed to self.fields.years (etc.)

Copy link
Owner

@zslayton zslayton left a comment

Choose a reason for hiding this comment

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

Thanks!

@zslayton zslayton merged commit 3703507 into zslayton:master Feb 17, 2021
@koenichiwa koenichiwa deleted the feature/source-fields branch February 23, 2021 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants