• snaggen
    link
    fedilink
    arrow-up
    5
    ·
    4 days ago

    I think this would be a nice improvement to reduce boiler plate.

  • d_k_bo@feddit.org
    link
    fedilink
    arrow-up
    4
    ·
    edit-2
    2 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 },
    )
    
    
  • robinm
    link
    fedilink
    arrow-up
    5
    ·
    5 days ago

    It’s really nice to see this RFC progress