lib_hello/lib.rs
1#[cfg(feature="greeting")]
2pub fn saying_hello(name: &str) -> String{
3 format!("Hello {}", name)
4}
5
6#[cfg(feature="farewell")]
7pub fn saying_bye(name: &str) -> String{
8 format!("Good Bye {}", name)
9}
10
11#[cfg(feature="communication")]
12pub fn hello_and_bye(name: &str){
13 println!("Hello {}, hope we meet again someday...", name);
14}