-
-
Notifications
You must be signed in to change notification settings - Fork 262
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[git-packetline] add async-io feature toggle
- Loading branch information
Showing
7 changed files
with
44 additions
and
24 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,4 @@ | ||
pub type Result = std::result::Result<(), Box<dyn std::error::Error>>; | ||
|
||
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) => assert!(false, "Expected error '{}', got value {:?}", expected.as_ref(), v), | ||
Err(err) => assert_eq!(err.to_string(), expected.as_ref()), | ||
} | ||
} | ||
|
||
#[cfg(feature = "blocking-io")] | ||
mod blocking; | ||
#[cfg(feature = "blocking-io")] | ||
mod decode; | ||
#[cfg(feature = "blocking-io")] | ||
mod encode; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
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) => assert!(false, "Expected error '{}', got value {:?}", expected.as_ref(), v), | ||
Err(err) => assert_eq!(err.to_string(), expected.as_ref()), | ||
} | ||
} | ||
|
||
#[cfg(not(any(feature = "async-io", feature = "blocking-io")))] | ||
mod decode; | ||
#[cfg(not(any(feature = "async-io", feature = "blocking-io")))] | ||
mod encode; |