emabee / flexi_logger

A flexible logger for rust programs that can write to stderr, stdout, and/or to log files
Apache License 2.0
307 stars 50 forks source link

Add Clone and Copy implementations to Duplicate enum #109

Closed complexspaces closed 2 years ago

complexspaces commented 2 years ago

This PR adds derived Clone and Copy trait implementations to the Duplicate enum. This allows users to more easily use a Duplicate value stored somewhere multiple times without resorting to weird match tricks to "copy" the value. Instead, the standard ways like deferring and calling .clone() will work.