Skip to content

Instantly share code, notes, and snippets.

View herabit's full-sized avatar
🏳️‍⚧️
evolving

Hera Chamorro herabit

🏳️‍⚧️
evolving
View GitHub Profile
use std::iter::FusedIterator;
use enumset::EnumSetType;
#[derive(Debug, PartialOrd, Ord, Hash, EnumSetType)]
pub enum Horizontal {
None = 0,
East,
West,
Both,
@herabit
herabit / bit-range.rs
Created March 22, 2024 04:12
I think this should work
use std::{
iter::FusedIterator,
ops::Range,
};
use bitvec::{
order::{BitOrder, Lsb0},
store::BitStore,
};
@herabit
herabit / cursed-mathml-macro.rs
Created April 29, 2024 22:28
There's probably a better way of doing this, though, I am stubborn and refuse to find out, this is good enough. Probably some bugs I have yet to encounter due to my arguably, nonexistent testing.
macro_rules! mathml_impl {
() => {
""
};
($ident:ident $($tt:tt)*) => {
::core::concat!(
"<mi>",
::core::stringify!($ident),
"</mi>",
mod sealed;
// mod util;
pub trait Split<Scalar>: sealed::Sealed {
type Array: AsRef<[Scalar]> + AsMut<[Scalar]>;
#[must_use]
fn split(self) -> Self::Array;
#[must_use]