redicat_lib/core/
errors.rs1use anyhow::Error;
2use std::io;
3
4#[inline]
6pub fn is_broken_pipe(err: &Error) -> bool {
7 err.root_cause()
8 .downcast_ref::<io::Error>()
9 .map(|io_err| io_err.kind() == io::ErrorKind::BrokenPipe)
10 .unwrap_or(false)
11}