While rust protects against passing and assigning the wrong types and leaving dangling pointers, it does not protect against writing inefficient garbage.