20 lines · 692 B · Rust
RawDownload
pub type Result = std::result::Result<(), Box<dyn std::error::Error>>; pub fn assert_err_display<T: std::fmt::Debug, E: std::error::Error>(    res: std::result::Result<T, E>,    expected: impl AsRef<str>,) {    match res {        Ok(v) => panic!("Expected error '{}', got value {:?}", expected.as_ref(), v),        Err(err) => assert_eq!(err.to_string(), expected.as_ref()),    }} #[cfg(all(feature = "async-io", not(feature = "blocking-io")))]mod decode;#[cfg(all(feature = "async-io", not(feature = "blocking-io")))]mod encode;#[cfg(all(feature = "async-io", not(feature = "blocking-io")))]mod read;#[cfg(all(feature = "async-io", not(feature = "blocking-io")))]mod write;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t