From 132d99a27b95cfb24c5517545ccc791ef65ec26c Mon Sep 17 00:00:00 2001 From: Johannes Altmanninger Date: Fri, 3 Feb 2023 16:13:37 +0100 Subject: [PATCH] Call rust_init() in fish_indent too The initial port of feature flags requires a global initialization. Since fish_indent accesses feature flags, let's make sure to initialize them here. In future, we can stop initializing things fish_indent doesn't need (like the topic monitor) but that's no big deal. Global initialization should always be a benign addition. --- src/fish_indent.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fish_indent.cpp b/src/fish_indent.cpp index b4220182c..1318ee857 100644 --- a/src/fish_indent.cpp +++ b/src/fish_indent.cpp @@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include "env.h" #include "expand.h" #include "fds.h" +#include "ffi_init.rs.h" #include "fish_version.h" #include "flog.h" #include "future_feature_flags.h" @@ -873,6 +874,7 @@ int main(int argc, char *argv[]) { program_name = L"fish_indent"; set_main_thread(); setup_fork_guards(); + rust_init(); // Using the user's default locale could be a problem if it doesn't use UTF-8 encoding. That's // because the fish project assumes Unicode UTF-8 encoding in all of its scripts. //