Closed GnomedDev closed 8 months ago
I think providing a 'static argument to program and a local 'a
to YoutubeDl
will just shrink the lifetime to 'a
, but not too sure. I'm good for merge.
I think providing a 'static argument to program and a local
'a
toYoutubeDl
will just shrink the lifetime to'a
,
Had a quick test on rust-playground, this is indeed the case. :)
This changes
YoutubeDl
to have a lifetime, to allow users to provide&str
references for the url/query. This can't currently be used forInput
, where users have to provideString
or&'static str
, but is useful for users fetching metadata/searching.This also makes
search
returnimpl Iterator
to avoid the unnecessaryVec
buffering possibly performed, which relies onEither
as a primitive form ofenum_dispatch
, but it's already in the dep tree so it doesn't matter.