daily pastebin goal
31%
SHARE
TWEET

Untitled

a guest Oct 22nd, 2018 65 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. use std::sync::{Mutex, MutexGuard};
  2.  
  3. trait Lock<'a, GUARD: 'a> {
  4.     fn lock(&'a self) -> GUARD;
  5. }
  6.  
  7. impl<'a, T> Lock<'a, MutexGuard<'a, T>> for Mutex<T> {
  8.     fn lock(&'a self) -> MutexGuard<'a, T> {
  9.         self.lock().unwrap()
  10.     }
  11. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top