let_mut

    0

    0

    lucycodes42

    Rust snippets

    ;

    varname can be any type, but will be a variable of that type. expr is an expression that will be evaluated and assigned to the variable varname .

    let mut variable_name : String = "Hello " ;

    This code is the same as the previous code, only the variable_name variable will be automatically initialized to "Hello" .

    Shortcut: let_mut

    let mut varname : type = expr
    Codiga Logo
    Codiga Hub
    • Rulesets
    • Explore
    • Cookbooks
    • Playground
    soc-2 icon

    We are SOC-2 Compliance Certified

    G2 high performer medal

    Codiga – All rights reserved 2022.