iphone 0.1.0

Return the latest iPhone model, price (USD), and release date.
Documentation
1
2
3
4
5
6
7
8
9
fn main() {
    match iphone::fetch_latest() {
        Ok(info) => println!(
            "最新 iPhone: {},起售价: {:?},发布日期: {:?}",
            info.model, info.price_usd, info.release_date
        ),
        Err(e) => eprintln!("抓取失败,使用回退: {}", e),
    }
}