mozilla / cubeb-rs

ISC License
61 stars 19 forks source link

Drop 'static lifetime from ContextOps::backend_id return value. #42

Closed kinetiknz closed 5 years ago

kinetiknz commented 5 years ago

This allows implementations to return a value with a shorter lifetime, e.g. tied to the associated implementation of ContextOp.

r? @ChunMinChang please


This change is Reviewable

kinetiknz commented 5 years ago

It uses the same (implicit) lifetime as &mut self, so the result must live as long as the ContextOps implementor. The existing implementations of ContextOps can keep using 'static if they're doing something as simple as returning a 'static &str.