From 68d47fa8b51d67f1dda30d21ed1d84fd031f415a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=A4=D0=B0=D1=82=D1=82=D0=B0=D1=85=D0=BE=D0=B2=20=D0=9C?= =?UTF-8?q?=D0=B0=D1=80=D0=B0=D1=82=20=D0=A0=D1=83=D1=81=D0=BB=D0=B0=D0=BD?= =?UTF-8?q?=D0=BE=D0=B2=D0=B8=D1=87?= <161203mar@gmail.com> Date: Wed, 27 Nov 2024 06:50:56 +0300 Subject: [PATCH] tests: Small refactor of doc tests (#396) Move use NamedSource a bit up, since now it looks like it is not imported. Co-authored-by: Marat Fattakhov --- src/lib.rs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/lib.rs b/src/lib.rs index 3c1a6fe..175c929 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.