debugging

This commit is contained in:
John Smith
2021-12-14 09:48:33 -05:00
parent 8fe99f6090
commit c4b66aad36
23 changed files with 411 additions and 143 deletions

View File

@@ -1,6 +1,15 @@
use crate::xx::*;
use alloc::string::ToString;
#[macro_export]
macro_rules! assert_err {
($ex:expr) => {
if let Ok(v) = $ex {
panic!("assertion failed, expected Err(..), got {:?}", v);
}
};
}
pub fn split_port(name: &str) -> Result<(String, Option<u16>), String> {
if let Some(split) = name.rfind(':') {
let hoststr = &name[0..split];