Skip to content

Commit 21f2948

Browse files
cramertjcopybara-github
authored andcommitted
Stop getting googletest::Result from the prelude
The prelude's inclusion of googletest::Result is confusing as it shadow's the standard library's Result type without a visible import. This is a first step towards removing googletest::Result from the prelude. PiperOrigin-RevId: 714850312
1 parent 7a54871 commit 21f2948

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

59 files changed

+171
-93
lines changed

googletest/src/description.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -260,6 +260,7 @@ impl<T: Into<Cow<'static, str>>> From<T> for Description {
260260
mod tests {
261261
use super::Description;
262262
use crate::prelude::*;
263+
use crate::Result;
263264
use indoc::indoc;
264265

265266
#[test]

googletest/src/fixtures.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -144,6 +144,7 @@ mod tests {
144144
use crate as googletest;
145145
use crate::prelude::*;
146146
use crate::test;
147+
use crate::Result;
147148

148149
#[test]
149150
fn fixture_no_fixture() -> Result<()> {

googletest/src/internal/description_renderer.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -278,6 +278,7 @@ enum Decoration {
278278
mod tests {
279279
use super::{Block, Fragment, List};
280280
use crate::prelude::*;
281+
use crate::Result;
281282
use indoc::indoc;
282283

283284
#[test]

googletest/src/matcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -310,6 +310,7 @@ impl<T: Debug + Copy, M: Matcher<T>> Matcher<T> for &M {
310310
#[cfg(test)]
311311
mod tests {
312312
use crate::prelude::*;
313+
use crate::Result;
313314

314315
#[test]
315316
fn ref_matchers_can_be_reused() -> Result<()> {

googletest/src/matcher_support/auto_eq.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,7 @@ pub mod internal {
8787
#[cfg(test)]
8888
mod tests {
8989
use crate::prelude::*;
90+
use crate::Result;
9091

9192
#[test]
9293
fn auto_ref_matcher() -> Result<()> {

googletest/src/matcher_support/count_elements.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,9 @@ pub(crate) fn count_elements<ContainerT: IntoIterator>(value: ContainerT) -> usi
3030

3131
#[cfg(test)]
3232
mod tests {
33-
3433
use super::*;
3534
use crate::prelude::*;
35+
use crate::Result;
3636

3737
#[test]
3838
fn count_elements_vec() -> Result<()> {

googletest/src/matcher_support/edit_distance.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -284,6 +284,7 @@ impl<T: Clone> Path<T> {
284284
mod tests {
285285
use super::*;
286286
use crate::prelude::*;
287+
use crate::Result;
287288
use quickcheck::{quickcheck, Arbitrary, TestResult};
288289

289290
#[test]

googletest/src/matcher_support/summarize_diff.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,7 @@ impl SummaryBuilder {
433433
#[cfg(test)]
434434
mod tests {
435435
use super::*;
436-
use crate::{matcher_support::edit_distance::Mode, prelude::*};
436+
use crate::{matcher_support::edit_distance::Mode, prelude::*, Result};
437437
use indoc::indoc;
438438
use std::fmt::Write;
439439

googletest/src/matchers/all_matcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ macro_rules! __all {
8686
mod tests {
8787
use crate::matcher::MatcherResult;
8888
use crate::prelude::*;
89+
use crate::Result;
8990
use indoc::indoc;
9091

9192
#[test]

googletest/src/matchers/any_matcher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,7 @@ macro_rules! __any {
8888
mod tests {
8989
use crate::matcher::MatcherResult;
9090
use crate::prelude::*;
91+
use crate::Result;
9192
use indoc::indoc;
9293

9394
#[test]

0 commit comments

Comments
 (0)