From aea2f11f06704eec464111102088506b69d980d0 Mon Sep 17 00:00:00 2001 From: Dan Gohman Date: Tue, 10 Sep 2019 15:58:49 -0700 Subject: [PATCH] Mark `WasiCtx`'s internals as `pub(crate)`. --- src/ctx.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/ctx.rs b/src/ctx.rs index 35dd1eda78..580d04d575 100644 --- a/src/ctx.rs +++ b/src/ctx.rs @@ -127,9 +127,9 @@ impl WasiCtxBuilder { #[derive(Debug)] pub struct WasiCtx { - pub fds: HashMap, - pub args: Vec, - pub env: Vec, + pub(crate) fds: HashMap, + pub(crate) args: Vec, + pub(crate) env: Vec, } impl WasiCtx { @@ -148,11 +148,11 @@ impl WasiCtx { .and_then(|ctx| ctx.build()) } - pub fn contains_fd_entry(&self, fd: host::__wasi_fd_t) -> bool { + pub(crate) fn contains_fd_entry(&self, fd: host::__wasi_fd_t) -> bool { self.fds.contains_key(&fd) } - pub fn get_fd_entry( + pub(crate) fn get_fd_entry( &self, fd: host::__wasi_fd_t, rights_base: host::__wasi_rights_t, @@ -165,7 +165,7 @@ impl WasiCtx { } } - pub fn get_fd_entry_mut( + pub(crate) fn get_fd_entry_mut( &mut self, fd: host::__wasi_fd_t, rights_base: host::__wasi_rights_t, @@ -190,7 +190,7 @@ impl WasiCtx { } } - pub fn insert_fd_entry(&mut self, fe: FdEntry) -> Result { + pub(crate) fn insert_fd_entry(&mut self, fe: FdEntry) -> Result { // never insert where stdio handles usually are let mut fd = 3; while self.fds.contains_key(&fd) {