Commit c75dfa8
committed
net-api: change TryFrom<IpAddress> to just From
It turns out, the TryFrom impl for smoltcp's IpAddress can't fail.
This changed in 2023 with the upgrade to smoltcp 0.9, which made
the shape of IpAddress depend on which protocol features we'd
selected, removing the "unreachable" variants.
This commit converts the impl to From, making it clear that it can't
fail and eliminating an unwrap at its (apparently single) use site.1 parent 837813b commit c75dfa8
2 files changed
+4
-6
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
250 | 250 | | |
251 | 251 | | |
252 | 252 | | |
253 | | - | |
254 | | - | |
255 | | - | |
256 | | - | |
| 253 | + | |
| 254 | + | |
257 | 255 | | |
258 | 256 | | |
259 | 257 | | |
260 | | - | |
| 258 | + | |
261 | 259 | | |
262 | 260 | | |
263 | 261 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
718 | 718 | | |
719 | 719 | | |
720 | 720 | | |
721 | | - | |
| 721 | + | |
722 | 722 | | |
723 | 723 | | |
724 | 724 | | |
| |||
0 commit comments