• d_k_bo@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    17 days ago

    This is really great and would solve the problem that led me to create constructor-lite.

    With this RFC, its usage could be replaced with

    #[derive(Debug, PartialEq)]
    struct Movie {
        title: String,
        year: Option<u16> = None,
    }
    
    assert_eq!(
        Movie { title: "Star Wars".to_owned(), .. },
        Movie { title: "Star Wars".to_owned(), year: None },
    )