I don't get rules around mut prefix/suffix naming, if there are any. When I try to guess where _mut_ will be in a method name, I most often get it wrong.
There's .as_mut_ptr(), but there's also ptr::null_mut(). Shouldn't one of them be ptr::mut_null() or .as_ptr_mut()?
There's plenty of prefix methods as_mut_something(), e.g. .as_mut_slice(), but there's also suffix .get_mut, .iter_mut() and .last_mut. Then why not .as_something_mut()? (like .mut_edge_data)
I don't get rules around
mutprefix/suffix naming, if there are any. When I try to guess where_mut_will be in a method name, I most often get it wrong.There's
.as_mut_ptr(), but there's alsoptr::null_mut(). Shouldn't one of them beptr::mut_null()or.as_ptr_mut()?There's plenty of prefix methods
as_mut_something(), e.g..as_mut_slice(), but there's also suffix.get_mut,.iter_mut()and.last_mut. Then why not.as_something_mut()? (like.mut_edge_data)