fix(miette): maintain 1.70 MSRV

This commit is contained in:
Brooks J Rady 2025-04-26 18:54:31 +01:00
parent cf81969c4f
commit 792e8ba6ab
2 changed files with 5 additions and 5 deletions

View File

@ -78,7 +78,7 @@ impl Diagnostic for MietteError {
#[cfg(test)] #[cfg(test)]
pub(crate) mod tests { pub(crate) mod tests {
use std::error::Error; use std::{error::Error, io::ErrorKind};
use super::*; use super::*;
@ -99,9 +99,9 @@ pub(crate) mod tests {
#[test] #[test]
fn io_error() { fn io_error() {
let inner_error = io::Error::other("halt and catch fire"); let inner_error = io::Error::new(ErrorKind::Other, "halt and catch fire");
let outer_error = TestError(inner_error); let outer_error = TestError(inner_error);
let io_error = io::Error::other(outer_error); let io_error = io::Error::new(ErrorKind::Other, outer_error);
let miette_error = MietteError::from(io_error); let miette_error = MietteError::from(io_error);

View File

@ -46,7 +46,7 @@ impl<T, E: std::error::Error + Send + Sync + 'static> IntoDiagnostic<T, E> for R
#[cfg(test)] #[cfg(test)]
mod tests { mod tests {
use std::io; use std::io::{self, ErrorKind};
use super::*; use super::*;
@ -54,7 +54,7 @@ mod tests {
#[test] #[test]
fn diagnostic_error() { fn diagnostic_error() {
let inner_error = io::Error::other("halt and catch fire"); let inner_error = io::Error::new(ErrorKind::Other, "halt and catch fire");
let outer_error: Result<(), _> = Err(TestError(inner_error)); let outer_error: Result<(), _> = Err(TestError(inner_error));
let diagnostic_error = outer_error.into_diagnostic().unwrap_err(); let diagnostic_error = outer_error.into_diagnostic().unwrap_err();