From 50757499e552bb84dcca41537e4600a2452b9939 Mon Sep 17 00:00:00 2001 From: Jeong YunWon Date: Mon, 27 Jul 2020 07:52:51 +0900 Subject: [PATCH] InnerDict -> DictInner for naming convention --- vm/src/dictdatatype.rs | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/vm/src/dictdatatype.rs b/vm/src/dictdatatype.rs index 6116af321..d18863884 100644 --- a/vm/src/dictdatatype.rs +++ b/vm/src/dictdatatype.rs @@ -20,18 +20,18 @@ type HashIndex = hash::PyHash; type EntryIndex = usize; pub struct Dict { - inner: PyRwLock>, + inner: PyRwLock>, } -struct InnerDict { +struct DictInner { size: usize, indices: HashMap, entries: Vec>>, } -impl Clone for InnerDict { +impl Clone for DictInner { fn clone(&self) -> Self { - InnerDict { + DictInner { size: self.size, indices: self.indices.clone(), entries: self.entries.clone(), @@ -50,7 +50,7 @@ impl Clone for Dict { impl Default for Dict { fn default() -> Self { Dict { - inner: PyRwLock::new(InnerDict { + inner: PyRwLock::new(DictInner { size: 0, indices: HashMap::new(), entries: Vec::new(), @@ -82,11 +82,11 @@ pub struct DictSize { } impl Dict { - fn borrow_value(&self) -> PyRwLockReadGuard<'_, InnerDict> { + fn borrow_value(&self) -> PyRwLockReadGuard<'_, DictInner> { self.inner.read() } - fn borrow_value_mut(&self) -> PyRwLockWriteGuard<'_, InnerDict> { + fn borrow_value_mut(&self) -> PyRwLockWriteGuard<'_, DictInner> { self.inner.write() }