wt_hello/
lib.rs

1//!doc My first published crate. [wenris@yeah.net]
2
3//!doc simple hello function
4pub fn hello() -> String {
5    "Hello, Rust!".to_string()
6}
7
8#[cfg(test)]
9mod tests {
10    #[test]
11    fn it_works() {
12        assert_eq!(2 + 2, 4);
13    }
14
15    #[test]
16    fn test_hello() {
17        assert_eq!(super::hello(), "Hello, Rust!");
18    }
19}