"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

@ -150,9 +150,9 @@ impl JS<XMLHttpRequest> {
impl<T: Reflectable> JS<T> {
/// Create a new JS-owned value wrapped from a raw Rust pointer.
pub unsafe fn from_raw(raw: *mut T) -> JS<T> {
pub unsafe fn from_raw(raw: *T) -> JS<T> {
JS {
ptr: raw as *T
ptr: raw
}
}