Closed jiayihu closed 3 years ago
Good to hear from you again! I made some changes that I'd like you to review (you might have to git fetch && git reset --hard origin/master
since I rebased) and have some questions too:
#[macro_use]
that Clippy told me was unnecessary. Could you test that this doesn't break anything, even when using the log feature?let _ = $arg;
in order to turn it into a no-op instead of actually doing nothing (e.g. {}
)?[features]
with-log = ["log"]
It's not technically necessary since having an optional dependency adds an implicit feature with the same name, but it would make it more obvious to potential users that the functionality exists. I don't mind either way, you decide.
I'm ready to merge this as soon as you give my changes the green light. Just a small ping in case this slipped through the cracks, I'm in no rush at all :-)
Sorry, time flies so fast these days!
1 and 2 okay
3 The honest answer is that I don't know. Macro definitions are still a mystery to me 😄 The implementation was taken from https://github.com/smoltcp-rs/smoltcp/blob/master/src/macros.rs IIRC
4 I think it would make sense for better discoverability, but smoltcp doesn't do it. I guess we can assume one knows about the implications of optional = true
.
Thanks for the patience, it really slipped through my mind :)
Macro definitions are still a mystery to me
Same here ;-) Guess we'll leave it like that, it doesn't hurt and the compiler removes it anyway. Thank you.
I actually had this commits for a long while, but wanted to check to be sure it worked correctly, then forgot to ever open the PR.
log
feature to help with debuggingcreate_notification
method to create the packet which notifies observers about an update