Skip to content

Commit 1d03dbc

Browse files
committed
Make more currentprocess functions and structs crate-private
1 parent bbb6c4c commit 1d03dbc

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

src/cli/term2.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -103,11 +103,11 @@ mod termhack {
103103
// - Disable all terminal controls on non-tty's
104104
// - Swallow errors when we try to use features a terminal doesn't have
105105
// such as setting colours when no TermInfo DB is present
106-
pub struct AutomationFriendlyTerminal<T>(Box<dyn term::Terminal<Output = T> + Send>)
106+
pub(crate) struct AutomationFriendlyTerminal<T>(Box<dyn term::Terminal<Output = T> + Send>)
107107
where
108108
T: Isatty + io::Write;
109-
pub type StdoutTerminal = AutomationFriendlyTerminal<Box<dyn Writer>>;
110-
pub type StderrTerminal = AutomationFriendlyTerminal<Box<dyn Writer>>;
109+
pub(crate) type StdoutTerminal = AutomationFriendlyTerminal<Box<dyn Writer>>;
110+
pub(crate) type StderrTerminal = AutomationFriendlyTerminal<Box<dyn Writer>>;
111111

112112
macro_rules! swallow_unsupported {
113113
( $call:expr ) => {{
@@ -225,14 +225,14 @@ lazy_static! {
225225
Mutex::new(term::terminfo::TermInfo::from_env().ok());
226226
}
227227

228-
pub fn stdout() -> StdoutTerminal {
228+
pub(crate) fn stdout() -> StdoutTerminal {
229229
let info_result = TERMINFO.lock().unwrap().clone();
230230
AutomationFriendlyTerminal(termhack::make_terminal_with_fallback(info_result, || {
231231
process().stdout()
232232
}))
233233
}
234234

235-
pub fn stderr() -> StderrTerminal {
235+
pub(crate) fn stderr() -> StderrTerminal {
236236
let info_result = TERMINFO.lock().unwrap().clone();
237237
AutomationFriendlyTerminal(termhack::make_terminal_with_fallback(info_result, || {
238238
process().stderr()

tests/mock/clitools.rs

+6-1
Original file line numberDiff line numberDiff line change
@@ -600,7 +600,12 @@ where
600600
output
601601
}
602602

603-
pub fn run_inprocess<I, A>(config: &Config, name: &str, args: I, env: &[(&str, &str)]) -> Output
603+
pub(crate) fn run_inprocess<I, A>(
604+
config: &Config,
605+
name: &str,
606+
args: I,
607+
env: &[(&str, &str)],
608+
) -> Output
604609
where
605610
I: IntoIterator<Item = A>,
606611
A: AsRef<OsStr>,

0 commit comments

Comments
 (0)