rust-pcap / pcap

Rust language pcap library
Apache License 2.0
619 stars 142 forks source link

feat: fix and test examples in docs #283

Closed lockness-Ko closed 1 year ago

lockness-Ko commented 1 year ago

Added an extra unwrap to unwrap Option<Device> in both examples.

Just a minor addition to help newbies to rust :smiley:.

Wojtek242 commented 1 year ago

Unfortunately, it looks like due to permission errors this test cannot be added.

I have two suggestions:

  1. Either you can figure out how to can around the permission issues, OR
  2. You re-add the ignore label, but leave the other changes.
lockness-Ko commented 1 year ago

No worries! I think I'll re-add the ignore label and add a footnote to mention that to examples actually should work (in normal circumstances).

robs-zeynet commented 1 year ago

Note that the permissions issue is the same as in #285 which I've tried to dodge by using a feature flag instead of the 'ignore' option. Feedback welcome, but IMHO the feature flag is a cleaner way to say "this test should work".

Wojtek242 commented 1 year ago

Resolved by #296