Use IntoValue in config code (#13751)

# Description

Cleans up and refactors the config code using the `IntoValue` macro.
Shoutout to @cptpiepmatz for making the macro!

# User-Facing Changes

Should be none.

# After Submitting

Somehow refactor the reverse transformation.
This commit is contained in:
Ian Manske
2024-09-05 00:44:23 -07:00
committed by GitHub
parent 4792328d0e
commit abd230e12e
37 changed files with 992 additions and 1206 deletions

View File

@ -167,7 +167,7 @@ fn rm(
}
let span = call.head;
let rm_always_trash = stack.get_config(engine_state).rm_always_trash;
let rm_always_trash = stack.get_config(engine_state).rm.always_trash;
if !TRASH_SUPPORTED {
if rm_always_trash {