swap method

void swap(
  1. TreeSitterArray<T> other
)

Managed _array__swap, exchanging contents, size, and capacity.

Implementation

void swap(TreeSitterArray<T> other) {
  final storage = other._storage;
  final size = other._size;
  other._storage = _storage;
  other._size = _size;
  _storage = storage;
  _size = size;
}