Merge pull request #28 from yzsolt/update-libloading-to-0.7

Update libloading to 0.7
This commit is contained in:
Dzmitry Malyshau
2021-02-09 10:10:33 -05:00
committed by GitHub
3 changed files with 3 additions and 3 deletions

View File

@@ -18,7 +18,7 @@ implicit-link = []
[dependencies]
bitflags = "1"
libloading = { version = "0.6", optional = true }
libloading = { version = "0.7", optional = true }
[dependencies.winapi]
version = "0.3"

View File

@@ -56,7 +56,7 @@ pub struct DxgiLib {
#[cfg(feature = "libloading")]
impl DxgiLib {
pub fn new() -> Result<Self, libloading::Error> {
libloading::Library::new("dxgi.dll").map(|lib| DxgiLib { lib })
unsafe { libloading::Library::new("dxgi.dll").map(|lib| DxgiLib { lib }) }
}
pub fn create_factory2(

View File

@@ -96,6 +96,6 @@ pub struct D3D12Lib {
#[cfg(feature = "libloading")]
impl D3D12Lib {
pub fn new() -> Result<Self, libloading::Error> {
libloading::Library::new("d3d12.dll").map(|lib| D3D12Lib { lib })
unsafe { libloading::Library::new("d3d12.dll").map(|lib| D3D12Lib { lib }) }
}
}