From 92b309852e34c0d1132f01db0e16598fed261235 Mon Sep 17 00:00:00 2001 From: Marat Fattakhov Date: Tue, 6 Aug 2024 15:00:52 +0300 Subject: [PATCH] Small refactor of doc tests Move use NamedSource a bit up, since now it looks like it is not imported. --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 8946990..a202c53 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -100,7 +100,7 @@ //! //! `thiserror` is a great way to define them, and plays nicely with `miette`! //! */ -//! use miette::{Diagnostic, SourceSpan}; +//! use miette::{Diagnostic, NamedSource, SourceSpan}; //! use thiserror::Error; //! //! #[derive(Error, Debug, Diagnostic)] @@ -127,7 +127,7 @@ //! throughout your app (but NOT your libraries! Those should always return //! concrete types!). //! */ -//! use miette::{NamedSource, Result}; +//! use miette::Result; //! fn this_fails() -> Result<()> { //! // You can use plain strings as a `Source`, or anything that implements //! // the one-method `Source` trait.