Fix clippy.toml paths and a few clippy lints.

This commit is contained in:
Dan Gohman
2019-03-01 15:45:11 -08:00
parent e2f79ae405
commit 04d4b20df4
5 changed files with 11 additions and 11 deletions

View File

@@ -760,8 +760,8 @@ impl InstanceHandle {
/// Create a new `InstanceHandle` pointing at the instance
/// pointed to by the given `VMContext` pointer.
pub fn from_vmctx(vmctx: *mut VMContext) -> Self {
let instance = unsafe { (&mut *vmctx).instance() };
pub unsafe fn from_vmctx(vmctx: *mut VMContext) -> Self {
let instance = (&mut *vmctx).instance();
instance.refcount += 1;
Self { instance }
}