perf(zig): Lazy eval zig (#2187)

* perf(zig): evaluate version lazily

* fix(zig): update format string; update tests

* refact(zig): remove redundant clone and put everything to do with version eval into match statement

* tiny optimization

Co-authored-by: David Knaack <davidkna@users.noreply.github.com>

Co-authored-by: Moritz Vetter <mv@3yourmind.com>
Co-authored-by: David Knaack <davidkna@users.noreply.github.com>
This commit is contained in:
Moritz Vetter
2021-01-22 18:08:36 +01:00
committed by GitHub
parent 212dbc4e6b
commit 4e7f73da50
3 changed files with 13 additions and 15 deletions
+6 -6
View File
@@ -2498,12 +2498,12 @@ The module will be shown if any of the following conditions are met:
### Options
| Option | Default | Description |
| ---------- | ---------------------------------- | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | The style for the module. |
| `format` | `"via [$symbol$version]($style) "` | The format for the module. |
| `disabled` | `false` | Disables the `zig` module. |
| Option | Default | Description |
| ---------- | ------------------------------------ | ----------------------------------------------------- |
| `symbol` | `"↯ "` | The symbol used before displaying the version of Zig. |
| `style` | `"bold yellow"` | The style for the module. |
| `format` | `"via [$symbol($version )]($style)"` | The format for the module. |
| `disabled` | `false` | Disables the `zig` module. |
### Variables