I found that when creating MemHistory from Default::default(), the max_len (that is the maximum size of the history) is initialized to 0 due to the #[derive(Default)] on the MemHistory struct.
This is counter intuative since the history doesn't work as a history at all in that case.
I changed the Default implementation to call MemHistory::new() instead. Then the history max length will be initialized to 100 instead.
I found that when creating
MemHistory
fromDefault::default()
, themax_len
(that is the maximum size of the history) is initialized to0
due to the#[derive(Default)]
on theMemHistory
struct. This is counter intuative since the history doesn't work as a history at all in that case.I changed the
Default
implementation to callMemHistory::new()
instead. Then the history max length will be initialized to100
instead.