@@ -254,7 +254,7 @@ fn substitute_macros(input: &str) -> String {
254
254
///
255
255
/// - `description` explains where the output is from (usually "stdout" or "stderr").
256
256
/// - `other_output` is other output to display in the error (usually stdout or stderr).
257
- pub fn match_exact (
257
+ pub ( crate ) fn match_exact (
258
258
expected : & str ,
259
259
actual : & str ,
260
260
description : & str ,
@@ -369,7 +369,11 @@ pub fn match_contains(expected: &str, actual: &str, cwd: Option<&Path>) -> Resul
369
369
/// anywhere.
370
370
///
371
371
/// See [Patterns](index.html#patterns) for more information on pattern matching.
372
- pub fn match_does_not_contain ( expected : & str , actual : & str , cwd : Option < & Path > ) -> Result < ( ) > {
372
+ pub ( crate ) fn match_does_not_contain (
373
+ expected : & str ,
374
+ actual : & str ,
375
+ cwd : Option < & Path > ,
376
+ ) -> Result < ( ) > {
373
377
if match_contains ( expected, actual, cwd) . is_ok ( ) {
374
378
bail ! (
375
379
"expected not to find:\n \
@@ -388,7 +392,7 @@ pub fn match_does_not_contain(expected: &str, actual: &str, cwd: Option<&Path>)
388
392
/// somewhere, and should be repeated `number` times.
389
393
///
390
394
/// See [Patterns](index.html#patterns) for more information on pattern matching.
391
- pub fn match_contains_n (
395
+ pub ( crate ) fn match_contains_n (
392
396
expected : & str ,
393
397
number : usize ,
394
398
actual : & str ,
@@ -425,7 +429,7 @@ pub fn match_contains_n(
425
429
///
426
430
/// See [`crate::Execs::with_stderr_line_without`] for an example and cautions
427
431
/// against using.
428
- pub fn match_with_without (
432
+ pub ( crate ) fn match_with_without (
429
433
actual : & str ,
430
434
with : & [ String ] ,
431
435
without : & [ String ] ,
@@ -473,7 +477,7 @@ pub fn match_with_without(
473
477
/// expected JSON objects.
474
478
///
475
479
/// See [`crate::Execs::with_json`] for more details.
476
- pub fn match_json ( expected : & str , actual : & str , cwd : Option < & Path > ) -> Result < ( ) > {
480
+ pub ( crate ) fn match_json ( expected : & str , actual : & str , cwd : Option < & Path > ) -> Result < ( ) > {
477
481
let ( exp_objs, act_objs) = collect_json_objects ( expected, actual) ?;
478
482
if exp_objs. len ( ) != act_objs. len ( ) {
479
483
bail ! (
@@ -494,7 +498,7 @@ pub fn match_json(expected: &str, actual: &str, cwd: Option<&Path>) -> Result<()
494
498
///
495
499
/// See [`crate::Execs::with_json_contains_unordered`] for more details and
496
500
/// cautions when using.
497
- pub fn match_json_contains_unordered (
501
+ pub ( crate ) fn match_json_contains_unordered (
498
502
expected : & str ,
499
503
actual : & str ,
500
504
cwd : Option < & Path > ,
@@ -552,7 +556,11 @@ fn collect_json_objects(
552
556
/// as paths). You can use a `"{...}"` string literal as a wildcard for
553
557
/// arbitrary nested JSON (useful for parts of object emitted by other programs
554
558
/// (e.g., rustc) rather than Cargo itself).
555
- pub fn find_json_mismatch ( expected : & Value , actual : & Value , cwd : Option < & Path > ) -> Result < ( ) > {
559
+ pub ( crate ) fn find_json_mismatch (
560
+ expected : & Value ,
561
+ actual : & Value ,
562
+ cwd : Option < & Path > ,
563
+ ) -> Result < ( ) > {
556
564
match find_json_mismatch_r ( expected, actual, cwd) {
557
565
Some ( ( expected_part, actual_part) ) => bail ! (
558
566
"JSON mismatch\n Expected:\n {}\n Was:\n {}\n Expected part:\n {}\n Actual part:\n {}\n " ,
@@ -619,7 +627,7 @@ fn find_json_mismatch_r<'a>(
619
627
}
620
628
621
629
/// A single line string that supports `[..]` wildcard matching.
622
- pub struct WildStr < ' a > {
630
+ pub ( crate ) struct WildStr < ' a > {
623
631
has_meta : bool ,
624
632
line : & ' a str ,
625
633
}
0 commit comments