mirror of https://github.com/aya-rs/aya
aya-log-ebpf: avoid requiring Copy
Before this change: ``` error[E0382]: use of moved value: `no_copy` --> test/integration-ebpf/src/log.rs:35:9 | 33 | let no_copy = NoCopy {}; | ------- move occurs because `no_copy` has type `NoCopy`, which does not implement the `Copy` trait 34 | 35 | debug!(&ctx, "{:x}", no_copy.consume()); | ^^^^^^^^^^^^^^^^^^^^^-------^---------^ | | | | | | | `no_copy` moved due to this method call | | use occurs due to use in closure | value used here after move | note: `NoCopy::consume` takes ownership of the receiver `self`, which moves `no_copy` --> test/integration-ebpf/src/log.rs:28:24 | 28 | fn consume(self) -> u64 { | ^^^^ = note: this error originates in the macro `debug` (in Nightly builds, run with -Z macro-backtrace for more info) For more information about this error, try `rustc --explain E0382`. error: could not compile `integration-ebpf` (bin "log") due to previous error ```pull/611/head
parent
85ad0197e0
commit
de7972483b
Loading…
Reference in New Issue