"JS<T>::from_raw" should accept "*T" instead of "*mut T"

This commit is contained in:
Tetsuharu OHZEKI 2014-05-30 05:38:17 +09:00
parent e511c04935
commit 106627e6eb
5 changed files with 13 additions and 13 deletions

View file

@ -70,7 +70,7 @@ pub struct TrustedNodeAddress(pub *c_void);
impl<S: Encoder<E>, E> Encodable<S, E> for TrustedNodeAddress {
fn encode(&self, s: &mut S) -> Result<(), E> {
let TrustedNodeAddress(addr) = *self;
let node = addr as *Node as *mut Node;
let node = addr as *Node;
unsafe {
JS::from_raw(node).encode(s)
}