-
Notifications
You must be signed in to change notification settings - Fork 4
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
Rewrite and implement }karmalink & }karmaunlink #9
base: master
Are you sure you want to change the base?
Conversation
4ab4baf
to
c44e3cc
Compare
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.
Some small things.
Cargo.toml
Outdated
[dependencies.chrono] | ||
version = "0.2" | ||
[profile.release] | ||
overflow-checks = true |
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.
The overhead is negligible, but why?
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.
Because the overhead is negligible and I hate overflow bugs. :P
Feel free to veto me on this.
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.
Most logic and storage interaction is in karma.rs
including the logic for computing the group from an initial karma, but not the logic for linking karma. That logic depends on each other for correctness though. I think it makes sense to put all logic and storage interaction in karma.rs
and only the human interface in handler.rs
.
Co-authored-by: Lars Jellema <[email protected]>
Co-authored-by: Lars Jellema <[email protected]>
I will take a look at this when applying the fixes. I'm unsure whether I'll fix this though. In any case I'd like to prevent |
Btw. Perhaps I will take a look at that after merging this change. :P |
Changes in this commit:
using the
}karmalink
and}karmaunlink
commands.This patch rewrites the whole plugin almost completely. The reason that this
was necessary was because some of the previous dependencies changed so much
over the years, that their usage would have to be rewritten from scratch
anyway. In particular in the case of
peg
andrustc_serialize
, we have muchbetter crate support nowadays, so I replaced them with their modern
substitutes (
nom
andserde
).Fixes #5
Fixes #8