1#![doc(hidden)]
2use std::{convert::Infallible, panic::panic_any};
5
6#[derive(Debug, Clone, Copy)]
7pub struct IteratorDropper;
9impl<Item> FromIterator<Item> for IteratorDropper {
10 fn from_iter<Iterator: IntoIterator<Item = Item>>(_: Iterator) -> Self {
11 IteratorDropper
12 }
13}
14
15#[derive(Debug, Copy, Clone, PartialEq, Eq, Hash, Ord, PartialOrd)]
18pub struct ErrorPanicker(Infallible);
19
20#[allow(clippy::fallible_impl_from)]
21impl<T> From<T> for ErrorPanicker
22where
23 T: Into<eyre::Report>,
24{
25 fn from(t: T) -> Self {
26 panic_any(t.into())
27 }
28}