mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 04:27:02 +01:00
Previously the code would do `key.replace("KANIDM_", "")`, this allocates a new string, which is unnecessary, as we can simply call `strip_prefix("KANIDM_")`. This removes the `KANIDM_` prefix from a bunch of places, and doubles as a check that the variable is prefixed with `KANIDM_`. Overall I believe this change makes the code more robust and slightly reduces allocations, speeding up an admittedly cold function (only called very infrequently). |
||
---|---|---|
.. | ||
core | ||
daemon | ||
lib | ||
lib-macros | ||
testkit | ||
testkit-macros | ||
builder.sh | ||
Dockerfile |