summaryrefslogtreecommitdiff
path: root/mesonbuild/compilers/rust.py
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-06-09 01:03:49 +0300
committerJussi Pakkanen <jpakkane@gmail.com>2024-06-14 17:19:53 +0300
commit9a6fcd4d9a0c7bb248c5d0587632b741a3301e03 (patch)
treef066ab0ee942d2f12579bb075cb3afbdf3386f0b /mesonbuild/compilers/rust.py
parentc0d86024f5e647858f88bc400b45b3ad88a25c97 (diff)
downloadmeson-9a6fcd4d9a0c7bb248c5d0587632b741a3301e03.tar.gz
Replace direct indexing with named methods.
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r--mesonbuild/compilers/rust.py6
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]: