mirror of
https://github.com/Llewellynvdm/starship.git
synced 2025-01-29 18:18:31 +00:00
addd11e300
Kubernetes module was previously a bit messy, with lots of unnecessarily nested options. Clean this up using filter_map and find_map, with two major results: 1. `ctx_components` is now a Vec<KubeCtxComponent> instead of a Vec<Option<KubeCtxComponent>>. This greatly simplified downstream processing of these context components. 2. Instead of storing a partial computation of the namespace in variables `kube_ns`, etc, compute them directly in the formatter mapping. This is made simpler (read: actually doable) by change 1.