]> git.lizzy.rs Git - rust.git/blobdiff - src/machine.rs
Add communicate field to evaluator and fix formatting
[rust.git] / src / machine.rs
index f2c81c92d3d0043dfbe23d5dffe8748bd527e822..ed9a8a1c46346f320149b1a9e473cbc56e3e124a 100644 (file)
@@ -93,10 +93,13 @@ pub struct Evaluator<'tcx> {
 
     /// TLS state.
     pub(crate) tls: TlsData<'tcx>,
+
+    /// If enabled, the `env_vars` field is populated with the host env vars during initialization.
+    pub(crate) communicate: bool,
 }
 
 impl<'tcx> Evaluator<'tcx> {
-    pub(crate) fn new() -> Self {
+    pub(crate) fn new(communicate: bool) -> Self {
         Evaluator {
             env_vars: HashMap::default(),
             argc: None,
@@ -104,6 +107,7 @@ pub(crate) fn new() -> Self {
             cmd_line: None,
             last_error: 0,
             tls: TlsData::default(),
+            communicate,
         }
     }
 }