Stream: git-cranelift

Topic: cranelift / Issue #1274 Should SecondaryMap require Defau...


view this post on Zulip GitHub (Feb 28 2020 at 23:27):

alexcrichton transferred Issue #1274:

SecondaryMap requires its value to be Clone-able, and the only constructor requires the given default value to implement Default. This implies each SecondaryMap stores the default value, while we could just require Default and use Default::default() everywhere we use self.default.clone(). It would also allow using SecondaryMaps for things that implement Default but aren't Clone-able (I've got such a use case in a WIP PR).


Last updated: Nov 22 2024 at 16:03 UTC