Skip to content

Instantly share code, notes, and snippets.

@teburd
Created March 13, 2018 17:15
Show Gist options
  • Save teburd/4028d2bc77571cb08a1aa5c0e0f92b4a to your computer and use it in GitHub Desktop.
Save teburd/4028d2bc77571cb08a1aa5c0e0f92b4a to your computer and use it in GitHub Desktop.
unconstraint lifetime
impl<'a> Factory for CqlFactory {
type Session = CqlSession<'a>;
fn session(&self) -> FactoryResult<CqlSession<'a>> {
let client = tryl!(self.pool.get());
Ok(CqlSession::new(&self.cfg, client))
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment