mirror of
https://github.com/kanidm/kanidm.git
synced 2025-02-23 12:37:00 +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). |
||
---|---|---|
.. | ||
src | ||
static | ||
templates | ||
askama.toml | ||
build.rs | ||
Cargo.toml | ||
eslint.config.mjs | ||
package-lock.json | ||
package.json | ||
prettier-ignore |