scalar_map
map
for scalar types.
let num: = Some;
assert_eq!;
let num: i32 = 42;
assert_eq!;
let num: = Some;
assert_eq!;
let num: i32 = 42;
assert_eq!;
What does it solve
-
You can still keep
map
andand_then
intact even ifOption
is refactored out. -
You want
x.map.map
...instead of
new
Custom struct
Deriving
# Run this to add the `derive` feature
;
let num = MyNum;
assert_eq!;
Without deriving
;
let num = MyNum;
assert_eq!;