Utilisation de URL
commit
e48ac85011
@ -1,6 +1,14 @@
|
||||
use std::fmt;
|
||||
|
||||
#[derive(PartialEq, Clone, Debug)]
|
||||
pub struct PriceResult {
|
||||
pub name: String,
|
||||
pub product: String,
|
||||
pub price: f64
|
||||
}
|
||||
|
||||
impl fmt::Display for PriceResult {
|
||||
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
|
||||
write!(f, "Product «{}: {}» price {}€", self.product, self.name, self.price)
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue