Adding initial

This commit is contained in:
2020-12-05 01:57:06 +00:00
parent 87c67f9c3a
commit a4cff86b03
2 changed files with 22 additions and 0 deletions

21
src/employee_interface.rs Normal file
View File

@@ -0,0 +1,21 @@
#[derive(Debug)]
pub struct Employee {
name: &str,
department: &str,
}
impl Employee {
pub fn new(name: &str, department: &str) -> Self {
self::Employee { name, department }
}
}
#[cfg(test)]
use super::*;
mod test {
#[test]
fn new_employee() {
println!(Employee::new("Amir", "Sales"))
}
}

View File

@@ -3,6 +3,7 @@
mod stats; mod stats;
mod pig_latin; mod pig_latin;
mod employee_interface;
fn main() { fn main() {
// Stats // Stats