As a very slight cleanup to !560 (merged), use the .cast_mut() call in only one location.
.cast_mut()