diff options
author | Xavier Claessens <xavier.claessens@collabora.com> | 2021-10-12 21:45:24 -0400 |
---|---|---|
committer | Xavier Claessens <xclaesse@gmail.com> | 2022-03-22 17:20:48 -0400 |
commit | 06d12064d0ccb1477fadf1d62492a493fb2fb947 (patch) | |
tree | a405725996ecfcad94fdd242ebc6da7b246497ae /mesonbuild/compilers/rust.py | |
parent | 86aaac8e4229608b25508027267f49624a9a8cb5 (diff) | |
download | meson-06d12064d0ccb1477fadf1d62492a493fb2fb947.zip meson-06d12064d0ccb1477fadf1d62492a493fb2fb947.tar.gz meson-06d12064d0ccb1477fadf1d62492a493fb2fb947.tar.bz2 |
OptionOverrideProxy: Make it immutable to avoid copies
It is always used as an immutable view so there is no point in doing
copies. However, mypy insist it must implement the same APIs as
Dict[OptionKey, UserOption[Any]] so keep faking it.
Diffstat (limited to 'mesonbuild/compilers/rust.py')
-rw-r--r-- | mesonbuild/compilers/rust.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/mesonbuild/compilers/rust.py b/mesonbuild/compilers/rust.py index 399570d..a460b78 100644 --- a/mesonbuild/compilers/rust.py +++ b/mesonbuild/compilers/rust.py @@ -24,7 +24,7 @@ from ..mesonlib import ( from .compilers import Compiler, rust_buildtype_args, clike_debug_args if T.TYPE_CHECKING: - from ..coredata import KeyedOptionDictType + from ..coredata import MutableKeyedOptionDictType, KeyedOptionDictType from ..envconfig import MachineInfo from ..environment import Environment # noqa: F401 from ..linkers import DynamicLinker @@ -143,7 +143,7 @@ class RustCompiler(Compiler): # C compiler for dynamic linking, as such we invoke the C compiler's # use_linker_args method instead. - def get_options(self) -> 'KeyedOptionDictType': + def get_options(self) -> 'MutableKeyedOptionDictType': key = OptionKey('std', machine=self.for_machine, lang=self.language) return { key: coredata.UserComboOption( |