completed 03/[00-07]

This commit is contained in:
2025-02-24 15:53:03 +05:30
parent 7910a25928
commit 9161d08b1c
8 changed files with 116 additions and 25 deletions

View File

@@ -5,6 +5,17 @@
// It should also have a method named `is_available` that returns a `true` if the quantity is
// greater than 0, otherwise `false`.
struct Order{
price: u32,
quantity: u32,
}
impl Order{
fn is_available(self)-> bool{
self.quantity >0
}
}
#[cfg(test)]
mod tests {
use super::*;