still do not fully understand what PhantomData is *for* exactly (#991)

but standardized naming and usage to match https://doc.rust-lang.org/beta/nomicon/phantom-data.html
so at least it looks similar to the official docs
This commit is contained in:
Antioch Peverell
2018-04-21 17:03:45 -04:00
committed by GitHub
parent 77172057ff
commit ced6e647b8
3 changed files with 10 additions and 10 deletions
+4 -4
View File
@@ -36,7 +36,7 @@
//! either be a simple Vec or a database.
use std::clone::Clone;
use std::marker::PhantomData;
use std::marker;
use core::hash::Hash;
use ser;
use ser::{Readable, Reader, Writeable, Writer};
@@ -268,7 +268,7 @@ where
last_pos: u64,
backend: &'a mut B,
// only needed for parameterizing Backend
writeable: PhantomData<T>,
_marker: marker::PhantomData<T>,
}
impl<'a, T, B> PMMR<'a, T, B>
@@ -281,7 +281,7 @@ where
PMMR {
last_pos: 0,
backend: backend,
writeable: PhantomData,
_marker: marker::PhantomData,
}
}
@@ -292,7 +292,7 @@ where
PMMR {
last_pos: last_pos,
backend: backend,
writeable: PhantomData,
_marker: marker::PhantomData,
}
}