twitter/chill — pull request #57 by ryanlecompte (2013-05-20 07:57:12+00:00)
Title: Utilize CanBuildFrom implicits instead of relying on concrete builders

This pull request addresses one of the TODOs in the code base around utilizing `CanBuildFrom` to convert to the appropriate collection types. This basically makes the previously required introspection/cloning around mutable collections obsolete and has been removed in this pull request in favor of `CanBuildFrom`.

One thing to note in this pull request is that we're employing the known 2.9.x workaround `c: C with Traversable[T]` to get around a compiler inference bug. This issue has been fixed in 2.10 (the compiler lets you just say `c: C` as you would expect to work). I tested this workaround for things that get converted to Traversable, e.g. strings and arrays as well as BitSet. I couldn't find a collection where the workaround would fail, although there might be a case that I'm unaware of (and not already covered in the unit tests). All the unit tests pass, including the mutable ones!