aegix_rs/
lib.rs

1//! # Aegix RS
2//!
3//! A Rust library providing useful functionality.
4
5/// A simple function that returns a greeting message.
6///
7/// # Examples
8///
9/// ```
10/// use aegix_rs::hello;
11///
12/// let greeting = hello("world");
13/// assert_eq!(greeting, "Hello, world!");
14/// ```
15pub fn hello(name: &str) -> String {
16    format!("Hello, {}!", name)
17}
18
19#[cfg(test)]
20mod tests {
21    use super::*;
22
23    #[test]
24    fn test_hello() {
25        assert_eq!(hello("world"), "Hello, world!");
26        assert_eq!(hello("Rust"), "Hello, Rust!");
27    }
28}