hs-rust-learn 0.1.0

hs's rust test learn
Documentation
fn longest<'a>(a: &'a str, b: &'a str) -> &'a str {
    if a.len() > b.len() {
        a
    } else {
        b
    }
}

#[test]
#[should_panic(expected="not found ")]
fn abc() {
    assert_eq!(longest("world", "next"), "world");
    let s = String::from("hello world");
    let sub = String::from("wol");
    assert!(s.contains(sub.as_str()),
        "not found {}", &sub
    )
}


fn main() {

}