oct 0.26.0

Octonary transcodings.
Documentation
// Copyright 2024-2025 Gabriel Bjørnager Jensen.
//
// This Source Code Form is subject to the terms of
// the Mozilla Public License, v. 2.0. If a copy of
// the MPL was not distributed with this file, you
// can obtain one at:
// <https://mozilla.org/MPL/2.0/>.

//! The [`copy`] function.

#![cfg(test)]

use core::array;
use oct::io::{copy, Cursor};

#[test]
fn test_copy() {
	let mut src = Cursor::<[u8; 256]>::new(array::from_fn(|index| index.wrapping_mul(index) as u8));
	let mut dst = Cursor::<[u8; 256]>::new([Default::default(); _]);

	assert_eq!(copy(&mut src, &mut dst).unwrap(), 256);

	assert_eq!(dst, src);
}