79556894

Date: 2025-04-05 11:34:53
Score: 1
Natty:
Report link

You just allocate by pointing toward the reference, which work as long as it is mutable and there are no other references.

let mut foo: String = Default::default();
let foo_ref = &mut foo;
*foo_ref= "bar".to_string();
println!("{}",foo); // bar
Reasons:
  • Low length (0.5):
  • Has code block (-0.5):
  • Low reputation (1):
Posted by: nathaniel nizard