#![cfg_attr(not(feature = "std"), no_std)]
#![deny(missing_docs)]
#![doc(html_logo_url = "https://raw.githubusercontent.com/al8n/crabmole/main/art/crabmole.jpg")]
#![cfg_attr(docsrs, feature(doc_cfg))]
#![cfg_attr(docsrs, allow(unused_attributes))]
#[cfg(feature = "alloc")]
extern crate alloc;
#[cfg(feature = "sort")]
#[cfg_attr(docsrs, doc(cfg(feature = "sort")))]
pub mod sort;
#[cfg(any(
feature = "encoding",
feature = "hex",
feature = "base64",
feature = "base32",
feature = "binary",
feature = "ascii85"
))]
#[cfg_attr(
docsrs,
doc(cfg(any(
feature = "encoding",
feature = "hex",
feature = "base64",
feature = "base32",
feature = "binary",
feature = "ascii85"
)))
)]
pub mod encoding;
mod macros;
pub use macros::*;
#[cfg(any(
feature = "io",
feature = "async-io",
feature = "pipe",
feature = "async-pipe"
))]
#[cfg_attr(
docsrs,
doc(cfg(any(
feature = "io",
feature = "async-io",
feature = "pipe",
feature = "async-pipe"
)))
)]
pub mod io;
#[inline]
pub fn copy<T: core::marker::Copy>(src: &[T], dst: &mut [T]) -> usize {
let min_len = core::cmp::min(src.len(), dst.len());
dst[..min_len].copy_from_slice(&src[..min_len]);
min_len
}