Collection<T> only implements Clone if T implements Clone

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Done
    • Priority: Minor - P4
    • 2.1.0
    • Affects Version/s: None
    • Component/s: None
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      Due to a limitation in the Clone derive macro, a type that derives Clone will only actually be Clone if all of its fields and generic parameters are Clone. For Collection, this is overly restrictive, since none of its fields actually store any values of the generic parameter. We should manually implement Clone instead of deriving it to relax this requirement.

      See https://stegosaurusdormant.com/understanding-derive-clone/ for more information.

            Assignee:
            Andrew Witten (Inactive)
            Reporter:
            Patrick Freed
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: