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

introduce tcp and udp aliases #123

Merged
merged 1 commit into from
Jan 28, 2021
Merged

introduce tcp and udp aliases #123

merged 1 commit into from
Jan 28, 2021

Conversation

drunkirishcoder
Copy link
Contributor

Description

A small quality of life improvement by introducing a couple Tcp and Udp aliases. Instead of writing

let udp = packet.parse::<Tcp<Ipv4>>()?;

you can now write

let udp = packet.parse::<Tcp4>()?;

Type of change

  • New feature

Copy link
Member

@zeeshanlakhani zeeshanlakhani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Simple, but def like this. Good idea, and a pattern we should keep in mind.

@drunkirishcoder drunkirishcoder merged commit b92b02f into master Jan 28, 2021
@drunkirishcoder drunkirishcoder deleted the djin/tcp-udp-alias branch January 28, 2021 16:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants