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.
This commit is contained in:
Johannes Altmanninger 2023-02-03 16:13:37 +01:00
parent 517d53dc46
commit 132d99a27b

View file

@ -40,6 +40,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA
#include "env.h" #include "env.h"
#include "expand.h" #include "expand.h"
#include "fds.h" #include "fds.h"
#include "ffi_init.rs.h"
#include "fish_version.h" #include "fish_version.h"
#include "flog.h" #include "flog.h"
#include "future_feature_flags.h" #include "future_feature_flags.h"
@ -873,6 +874,7 @@ int main(int argc, char *argv[]) {
program_name = L"fish_indent"; program_name = L"fish_indent";
set_main_thread(); set_main_thread();
setup_fork_guards(); 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 // 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. // because the fish project assumes Unicode UTF-8 encoding in all of its scripts.
// //