Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Sanitize imports for prod macros, ran cargo fmt, clear warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
adrianwithah committed Sep 7, 2019
1 parent af4a942 commit 1ad152a
Show file tree
Hide file tree
Showing 15 changed files with 123 additions and 119 deletions.
12 changes: 2 additions & 10 deletions examples/aggregation/server/src/local_file_manager.rs
Original file line number Diff line number Diff line change
@@ -1,20 +1,13 @@
use com::{IUnknown, IUnknownVPtr, IUnknownVTable, iunknown_gen_vtable,};
use interface::{
ilocal_file_manager::{
ILocalFileManager, ILocalFileManagerVPtr, ILocalFileManagerVTable,
},
ilocal_file_manager_gen_vtable,
ilocal_file_manager::ILocalFileManager,
};

use winapi::{
ctypes::c_void,
shared::{
guiddef::{IsEqualGUID, IID, REFIID,},
winerror::{E_NOINTERFACE, HRESULT, NOERROR},
winerror::{HRESULT, NOERROR},
},
};

use core::mem::forget;
use com::AggrCoClass;

/// The implementation class
Expand Down Expand Up @@ -100,7 +93,6 @@ impl LocalFileManager {
// let non_del_unknown_vptr = Box::into_raw(Box::new(non_del_iunknown));

// // Initialising VTable for ILocalFileManager
// let ilocalfilemanager = ilocal_file_manager_gen_vtable!(LocalFileManager, 0);
// let ilocalfilemanager_vptr = Box::into_raw(Box::new(ilocalfilemanager));

// let out = LocalFileManager {
Expand Down
4 changes: 1 addition & 3 deletions examples/aggregation/server/src/local_file_manager_class.rs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
use crate::local_file_manager::LocalFileManager;

use com::{
ComPtr, IClassFactory, IClassFactoryVPtr, IClassFactoryVTable, IUnknown, IUnknownVPtr,
IClassFactory, IClassFactoryVPtr, IClassFactoryVTable, IUnknown, IUnknownVPtr,
IID_ICLASS_FACTORY, IID_IUNKNOWN,
};

Expand All @@ -14,8 +14,6 @@ use winapi::{
},
};

use core::mem::forget;

#[repr(C)]
pub struct LocalFileManagerClass {
inner: IClassFactoryVPtr,
Expand Down
13 changes: 6 additions & 7 deletions examples/aggregation/server/src/windows_file_manager.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,15 @@
use com::{failed, ComPtr, IUnknown, IUnknownVPtr, IUnknownVTable, IID_IUNKNOWN};
use com::{failed, ComPtr, IUnknown, IUnknownVPtr, IID_IUNKNOWN};
use interface::{
ifile_manager::{IFileManager, IFileManagerVPtr, IFileManagerVTable, IID_IFILE_MANAGER},
ilocal_file_manager::{IID_ILOCAL_FILE_MANAGER, ILocalFileManager},
ifile_manager::{IFileManager},
ilocal_file_manager::{ILocalFileManager},
CLSID_LOCAL_FILE_MANAGER_CLASS,
ifile_manager_gen_vtable,
};

use winapi::{
ctypes::c_void,
shared::{
guiddef::{IsEqualGUID, IID, REFCLSID, REFIID,},
winerror::{E_NOINTERFACE, HRESULT, NOERROR},
guiddef::{REFCLSID, REFIID,},
winerror::{HRESULT, NOERROR},
minwindef::{LPVOID, },
wtypesbase::CLSCTX_INPROC_SERVER,
},
Expand All @@ -20,7 +19,7 @@ use winapi::{
};

use std::mem::forget;
use std::ops::{Deref, DerefMut,};
use std::ops::{DerefMut,};

use com::CoClass;

Expand Down
9 changes: 3 additions & 6 deletions examples/aggregation/server/src/windows_file_manager_class.rs
Original file line number Diff line number Diff line change
@@ -1,19 +1,16 @@
use crate::windows_file_manager::WindowsFileManager;
use com::{
failed, IClassFactory, IClassFactoryVPtr, IClassFactoryVTable, IUnknown, IUnknownVPtr,
IClassFactory, IClassFactoryVPtr, IClassFactoryVTable, IUnknown, IUnknownVPtr,
IID_ICLASS_FACTORY, IID_IUNKNOWN,
};
use interface::CLSID_LOCAL_FILE_MANAGER_CLASS;

use winapi::{
ctypes::c_void,
shared::{
guiddef::{IsEqualGUID, IID, REFCLSID, REFIID},
minwindef::{BOOL, LPVOID},
guiddef::{IsEqualGUID, IID, REFIID},
minwindef::{BOOL,},
winerror::{CLASS_E_NOAGGREGATION, E_NOINTERFACE, HRESULT, NOERROR, S_OK},
wtypesbase::CLSCTX_INPROC_SERVER,
},
um::combaseapi::CoCreateInstance,
};

#[repr(C)]
Expand Down
12 changes: 4 additions & 8 deletions examples/basic/server/src/british_short_hair_cat.rs
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
use interface::{
ianimal::{IAnimal, IID_IANIMAL},
icat::{ICat, ICatVPtr, ICatVTable, IID_ICAT},
idomesticanimal::{
IDomesticAnimal, IDomesticAnimalVPtr, IDomesticAnimalVTable,
},
ianimal::IAnimal,
icat::ICat,
idomesticanimal::IDomesticAnimal,
};

use winapi::{
ctypes::c_void,
shared::{
guiddef::{IsEqualGUID, IID},
winerror::{E_NOINTERFACE, HRESULT, NOERROR},
winerror::{HRESULT, NOERROR},
},
};

Expand Down
Loading

0 comments on commit 1ad152a

Please sign in to comment.