Stupidity

Trait Stupidity 

Source
pub trait Stupidity<T> {
    // Required method
    fn build_with_fn<F: FnMut(usize) -> T>(f: F) -> Self;
}
Expand description

now you might be asking: hey djugei, why isn’t this function just implemented directly on Vector?

and that is a very good question! well the answer is that for some reason if i copy this exact code into the types impl and delete the trait i get an infinite recursion error during compilation that i can’t explain, feels a lot like spooky action at a distance and that i would consider a compiler bug

Required Methods§

Source

fn build_with_fn<F: FnMut(usize) -> T>(f: F) -> Self

Dyn Compatibility§

This trait is not dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety", so this trait is not object safe.

Implementors§

Source§

impl<T, const N: usize> Stupidity<T> for Vector<T, N>