Skip to content

Commit 72c84ec

Browse files
committed
Fix formatting
1 parent d6aea60 commit 72c84ec

File tree

2 files changed

+6
-9
lines changed

2 files changed

+6
-9
lines changed

src/rt/object.rs

+4-7
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,10 @@ pub(super) struct Store<T = Entry> {
2020
id: StoreId,
2121
}
2222

23-
2423
#[derive(Debug, Eq, PartialEq, Hash, Clone, Copy)]
2524
#[cfg_attr(feature = "checkpoint", derive(Serialize, Deserialize))]
2625
pub(super) struct StoreId(usize);
2726

28-
2927
pub(super) trait Object: Sized {
3028
type Entry;
3129

@@ -222,9 +220,9 @@ impl<T> Store<T> {
222220
})
223221
}
224222

225-
pub(super) fn iter_mut<'a, O>(&'a mut self) -> impl DoubleEndedIterator<Item=&mut O>
226-
where
227-
O: Object<Entry=T> + 'a,
223+
pub(super) fn iter_mut<'a, O>(&'a mut self) -> impl DoubleEndedIterator<Item = &mut O>
224+
where
225+
O: Object<Entry = T> + 'a,
228226
{
229227
self.entries.iter_mut().filter_map(O::get_mut)
230228
}
@@ -316,8 +314,7 @@ impl<T: Object> Ref<T> {
316314
/// Panic if the reference belongs to a different store
317315
fn assert_store_id(self, store: &Store<T::Entry>) {
318316
assert_eq!(
319-
self.store_id,
320-
store.id,
317+
self.store_id, store.id,
321318
"Tried to access an object using a reference that belongs to a different store. \
322319
This might indicate you are trying to reuse an object from an earlier execution"
323320
)

tests/cell_reuse.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ thread_local! {
77
}
88

99
#[test]
10-
#[should_panic="Tried to access an object using a reference that belongs to a different store. This might indicate you are trying to reuse an object from an earlier execution"]
10+
#[should_panic = "Tried to access an object using a reference that belongs to a different store. This might indicate you are trying to reuse an object from an earlier execution"]
1111
fn test_cell_reuse() {
1212
loom::model(|| {
1313
let handle_a = loom::thread::spawn(|| {
@@ -17,4 +17,4 @@ fn test_cell_reuse() {
1717
handle_a.join().unwrap();
1818
handle_b.join().unwrap();
1919
});
20-
}
20+
}

0 commit comments

Comments
 (0)