diff options
author | Manlio Perillo <manlio.perillo@gmail.com> | 2023-04-30 16:07:30 +0200 |
---|---|---|
committer | Manlio Perillo <manlio.perillo@gmail.com> | 2023-05-01 18:39:54 +0200 |
commit | ec1976e9abd777b674c3090ffd17a79630292284 (patch) | |
tree | d3af415b5bc1f889f561c8b5e61e95a3d0e5fa8d /exercises/071_comptime6.zig | |
parent | 070734a520d4bb1d08edae24a09180d52345a895 (diff) |
build: reduce code duplication when setting the work path
Currently, the code for defining the path to the exercises directory is
duplicate 4 times.
Add the constants `healed_path` and `work_path`, and use work_path
instead of the duplicated if expression. Update ZiglingStep to take
`work_path` instead of `use_healed` as argument.
Reduce code length by using `join` instead of `std.fs.path.join` and
replace the use of a slice with a tuple.
Additionally, in case of an error from the `join` function, use @panic
instead of unreachable.
Document why the special branch, when the exercises are healed by the
eowyn script, has been disabled.
Diffstat (limited to 'exercises/071_comptime6.zig')
0 files changed, 0 insertions, 0 deletions