Excellent catch! Added validation for the new
params
fil
joined 1 year ago
By adding the return statement you pass the ownership of the string back to main. The unmodified function just took the ownership of the string and deallocated it after printing. Hope this helps
Is there a link to the blog somewhere?