From 4eb1eb3c4a4d1d3328128d85c490d7384753f004 Mon Sep 17 00:00:00 2001 From: Jussi Pakkanen Date: Sat, 8 Jun 2024 18:31:11 +0300 Subject: Use helper method in Rust compiler class. --- mesonbuild/compilers/rust.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 0f52dbb5e..346a3dd69 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -159,7 +159,7 @@ class RustCompiler(Compiler): def get_options(self) -> MutableKeyedOptionDictType: return dict((self.create_option(options.UserComboOption, - OptionKey('std', machine=self.for_machine, lang=self.language), + self.form_langopt_key('std'), 'Rust edition to use', ['none', '2015', '2018', '2021'], 'none'),)) @@ -172,7 +172,7 @@ class RustCompiler(Compiler): def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: args = [] - key = OptionKey('std', machine=self.for_machine, lang=self.language) + key = self.form_langopt_key('std') std = options[key] if std.value != 'none': args.append('--edition=' + std.value) -- cgit v1.2.3