• nous@programming.dev
    link
    fedilink
    English
    arrow-up
    1
    ·
    1 year ago

    You can give it variables:

    let foo = 4;
    let bar = "bar";
    format!("{foo}{bar}");
    

    If you have a format string that long with arbatary expressions putting them all raw in the format string is not going to improve much. Better to give them actual names first.