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

Revert "Add blanket impls of Packet for Box<T> and &T." #605

Merged
merged 1 commit into from
Feb 3, 2023

Conversation

mrmonday
Copy link
Contributor

@mrmonday mrmonday commented Feb 3, 2023

Reverts #599

Looks like the implementation was incorrect, it gives the following warnings:

warning: function cannot return without recursing
  --> pnet_macros_support/src/packet.rs:29:5
   |
29 |     fn packet(&self) -> &[u8] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
30 |         self.packet()
   |         ------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose
   = note: `#[warn(unconditional_recursion)]` on by default

warning: function cannot return without recursing
  --> pnet_macros_support/src/packet.rs:34:5
   |
34 |     fn payload(&self) -> &[u8] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
35 |         self.payload()
   |         -------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

warning: function cannot return without recursing
  --> pnet_macros_support/src/packet.rs:41:5
   |
41 |     fn packet(&self) -> &[u8] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
42 |         self.packet()
   |         ------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

warning: function cannot return without recursing
  --> pnet_macros_support/src/packet.rs:46:5
   |
46 |     fn payload(&self) -> &[u8] {
   |     ^^^^^^^^^^^^^^^^^^^^^^^^^^ cannot return without recursing
47 |         self.payload()
   |         -------------- recursive call site
   |
   = help: a `loop` may express intention better if this is on purpose

@mrmonday mrmonday merged commit 4e9993c into master Feb 3, 2023
@mrmonday mrmonday deleted the revert-599-blanket_impls branch February 3, 2023 14:47
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.

1 participant