This took a little more work than I was expecting, as I missed that Video stores VideoOptions, therefore we need a new lifetime parameter on Video to make this work. Unfortunately this is a breaking change for anyone storing a Video in a struct (not sure why you would), but I was able to avoid the main one (users passing VideoOptions by value) by relaxing the type signature of Video::new_with_options().
I also removed a redundant clone on the Video::get_options() method, needed to be touched anyway for this change.
Follow on from issue #38.
This took a little more work than I was expecting, as I missed that
Video
storesVideoOptions
, therefore we need a new lifetime parameter on Video to make this work. Unfortunately this is a breaking change for anyone storing aVideo
in a struct (not sure why you would), but I was able to avoid the main one (users passing VideoOptions by value) by relaxing the type signature ofVideo::new_with_options()
.I also removed a redundant clone on the
Video::get_options()
method, needed to be touched anyway for this change.