mirror of https://github.com/zkat/miette.git
fix(miette): maintain 1.70 MSRV
This commit is contained in:
parent
cf81969c4f
commit
792e8ba6ab
|
|
@ -78,7 +78,7 @@ impl Diagnostic for MietteError {
|
|||
|
||||
#[cfg(test)]
|
||||
pub(crate) mod tests {
|
||||
use std::error::Error;
|
||||
use std::{error::Error, io::ErrorKind};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
@ -99,9 +99,9 @@ pub(crate) mod tests {
|
|||
|
||||
#[test]
|
||||
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 io_error = io::Error::other(outer_error);
|
||||
let io_error = io::Error::new(ErrorKind::Other, outer_error);
|
||||
|
||||
let miette_error = MietteError::from(io_error);
|
||||
|
||||
|
|
|
|||
|
|
@ -46,7 +46,7 @@ impl<T, E: std::error::Error + Send + Sync + 'static> IntoDiagnostic<T, E> for R
|
|||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use std::io;
|
||||
use std::io::{self, ErrorKind};
|
||||
|
||||
use super::*;
|
||||
|
||||
|
|
@ -54,7 +54,7 @@ mod tests {
|
|||
|
||||
#[test]
|
||||
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 diagnostic_error = outer_error.into_diagnostic().unwrap_err();
|
||||
|
|
|
|||
Loading…
Reference in New Issue