Remove some unnecessary `as_slice` calls