diff options
| author | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-09 01:03:49 +0300 |
|---|---|---|
| committer | Jussi Pakkanen <jpakkane@gmail.com> | 2024-06-14 17:19:53 +0300 |
| commit | 9a6fcd4d9a0c7bb248c5d0587632b741a3301e03 (patch) | |
| tree | f066ab0ee942d2f12579bb075cb3afbdf3386f0b /mesonbuild/compilers/rust.py | |
| parent | c0d86024f5e647858f88bc400b45b3ad88a25c97 (diff) | |
| download | meson-9a6fcd4d9a0c7bb248c5d0587632b741a3301e03.tar.gz | |
Replace direct indexing with named methods.
Diffstat (limited to 'mesonbuild/compilers/rust.py')
| -rw-r--r-- | mesonbuild/compilers/rust.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 346a3dd69..b130c58ee 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -173,9 +173,9 @@ class RustCompiler(Compiler): def get_option_compile_args(self, options: 'KeyedOptionDictType') -> T.List[str]: args = [] key = self.form_langopt_key('std') - std = options[key] - if std.value != 'none': - args.append('--edition=' + std.value) + std = options.get_value(key) + if std != 'none': + args.append('--edition=' + std) return args def get_crt_compile_args(self, crt_val: str, buildtype: str) -> T.List[str]: |
