Explicitly bind lifetimes for NlaBuffer.value()#34
Explicitly bind lifetimes for NlaBuffer.value()#34vthriller wants to merge 3 commits intorust-netlink:mainfrom
Conversation
9cd7ce7 to
0d3315f
Compare
|
Please include unit test case proving your fix. |
0d3315f to
25702b2
Compare
|
There you go, also simplified example code a little bit. |
25702b2 to
744528f
Compare
|
(and one more force-push to fix typo, sorry about that) |
|
|
||
| // compile-time test, should not result in compiler complaints regarding | ||
| // lifetimes or returning values allegedly owned by this function | ||
| #[allow(dead_code)] |
There was a problem hiding this comment.
I was expecting something like:
#[cfg(test)]
mod tests {
use super::*;
#[test]
fn test_foo() {
}
}There was a problem hiding this comment.
Sure, I can craft some inputs-outputs, but the whole point is that behavior doesn't change at all, it's all about lifetimes. OTOH there are no NlasIterator tests at all, so there's no redundant work to be done, might as well hit two birds with one stone.
744528f to
ced8f3b
Compare
|
I don't like how this test looks, but at least there's no |
d36d580 to
d8ac1ba
Compare
…ifetime-related compiler errors
d8ac1ba to
c7610c4
Compare
|
I think I'm done for now. While I don't like |
Without this, the following results in an error: