meh / rust-tun

TUN device creation and handling.
340 stars 133 forks source link

Fix the error introduced by "fix(macOS): sc_unit should be the number in name + 1 " #71

Closed xmh0511 closed 9 months ago

xmh0511 commented 9 months ago

The merged pull request uses name[4..].parse()? + 1 in the pub fn new(config: &Configuration) -> Result<Self>, which makes the inferred type for the generic type of parse is (), which does not implement add<i32>.

     |
52   |             name[4..].parse()? + 1
     |                       ^^^^^ the trait `FromStr` is not implemented for `()`
ssrlive commented 9 months ago

BTW, Please change this line;

https://github.com/meh/rust-tun/blob/a9aa2c61b9b7b5e42818df19f6eb163b74d221bb/README.md?plain=1#L11

and this line

https://github.com/meh/rust-tun/blob/a9aa2c61b9b7b5e42818df19f6eb163b74d221bb/README.md?plain=1#L24

meh commented 9 months ago

Merged manually, and published a new version.

zonyitoo commented 9 months ago

Quite sorry about that!!