#iterator #result #name #options #no-alloc

no-std short-names

Add very short names to some methods in the core

2 releases

new 0.1.1 Mar 22, 2025
0.1.0 Mar 22, 2025

#7 in #result

MIT license

16KB
221 lines

Add very short names to some methods in the core

Examples

use short_names::*;

let a = Some(":foo".to_owned());
let b = Some(":bar");
let x = a.ad().o(b).mo("none", |x| &x[1..]);
assert_eq!(x, "foo");
use short_names::*;

let arr = [0, 1, 2, 3, 4, 5];
let vec = arr.iter().co().f(|n| n%2==0).col::<Vec<_>>();
assert_eq!(vec, [0, 2, 4]);

No runtime deps