diff options
author | 2017-03-10 23:34:59 -0500 | |
---|---|---|
committer | 2017-03-10 23:34:59 -0500 | |
commit | f6615b0fb8172e7b4d42f153d7a4f6afe6d8350c (patch) | |
tree | 2bfd9e278d2dcfa70a132c9b7bc5d6ede640c97c /src/ctxt.rs | |
parent | 81c9d39ebc8e73baa396a60eb8d9f717a74b96f0 (diff) | |
download | cortex-m-f6615b0fb8172e7b4d42f153d7a4f6afe6d8350c.tar.gz cortex-m-f6615b0fb8172e7b4d42f153d7a4f6afe6d8350c.tar.zst cortex-m-f6615b0fb8172e7b4d42f153d7a4f6afe6d8350c.zip |
reformat
Diffstat (limited to 'src/ctxt.rs')
-rw-r--r-- | src/ctxt.rs | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/src/ctxt.rs b/src/ctxt.rs index 2fdd182..0a05ecb 100644 --- a/src/ctxt.rs +++ b/src/ctxt.rs @@ -5,14 +5,16 @@ use core::cell::UnsafeCell; /// Data local to a context pub struct Local<T, Ctxt> - where Ctxt: Context +where + Ctxt: Context, { _ctxt: PhantomData<Ctxt>, data: UnsafeCell<T>, } impl<T, Ctxt> Local<T, Ctxt> - where Ctxt: Context +where + Ctxt: Context, { /// Initializes context local data pub const fn new(value: T) -> Self { @@ -28,7 +30,11 @@ impl<T, Ctxt> Local<T, Ctxt> } } -unsafe impl<T, Ctxt> Sync for Local<T, Ctxt> where Ctxt: Context {} +unsafe impl<T, Ctxt> Sync for Local<T, Ctxt> +where + Ctxt: Context, +{ +} /// A token unique to a context pub unsafe trait Context {} |