linkerd2/policy-controller/k8s/api
Oliver Gould 7b5be9a27d
policy: Use `NonZeroU16` to represent ports (#8897)
In various places we read port configurations from external sources
(either the Kubernetes API or gRPC clients). We have manual checks in
place to ensure that port values are never zero. We can instead assert
this with the type system by using `NonZeroU16`.

This change updates the policy controller to use `NonZeroU16` for port
values. This allows us to replace our manual port value checks with
`NonZero::try_from`, etc.

Signed-off-by: Oliver Gould <ver@buoyant.io>
2022-07-15 11:41:56 -07:00
..
src policy: Use `NonZeroU16` to represent ports (#8897) 2022-07-15 11:41:56 -07:00
Cargo.toml rust: Update kube to v0.74 (#8841) 2022-07-11 12:49:38 -07:00