Skip to content

Commit e230730

Browse files
committed
Fix a typo in Accessor, ensure_invalidated -> ensure_validated
1 parent cd1abe6 commit e230730

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/config/validator.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -62,14 +62,14 @@ impl<T> Accessor<T> {
6262
self.is_validated.load(Ordering::Relaxed)
6363
}
6464

65-
fn ensure_invalidated(&self) {
65+
fn ensure_validated(&self) {
6666
if !self.is_validated() {
6767
panic!("config accessed before validation");
6868
}
6969
}
7070

7171
pub fn into_inner(self) -> T {
72-
self.ensure_invalidated();
72+
self.ensure_validated();
7373
self.data
7474
}
7575
}
@@ -97,14 +97,14 @@ impl<T: Validator> ops::Deref for Accessor<T> {
9797
type Target = T;
9898

9999
fn deref(&self) -> &Self::Target {
100-
self.ensure_invalidated();
100+
self.ensure_validated();
101101
&self.data
102102
}
103103
}
104104

105105
impl<T: Validator> ops::DerefMut for Accessor<T> {
106106
fn deref_mut(&mut self) -> &mut Self::Target {
107-
self.ensure_invalidated();
107+
self.ensure_validated();
108108
&mut self.data
109109
}
110110
}

0 commit comments

Comments
 (0)