Skip to content

Commit

Permalink
fix CI and prepare a release
Browse files Browse the repository at this point in the history
  • Loading branch information
nagisa committed Nov 29, 2024
1 parent e4b159b commit 5102b4a
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 8 deletions.
4 changes: 3 additions & 1 deletion .github/workflows/libloading.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ jobs:
- run: rustup install ${{ matrix.rust_toolchain }} --profile=minimal
- run: rustup default ${{ matrix.rust_toolchain }}
- run: rustup component add clippy
- run: cargo update -p libc --precise 0.2.155
if: ${{ matrix.rust_toolchain == "1.56.0" }}
- run: cargo clippy
- run: cargo test -- --nocapture
- run: cargo test --release -- --nocapture
Expand Down Expand Up @@ -77,7 +79,7 @@ jobs:
# - x86_64-unknown-netbsd
- x86_64-unknown-openbsd
- x86_64-unknown-redox
- x86_64-fuchsia
- x86_64-unknown-fuchsia
- wasm32-unknown-unknown
timeout-minutes: 20
steps:
Expand Down
5 changes: 3 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name = "libloading"
# When bumping
# * Don’t forget to add an entry to `src/changelog.rs`
# * If bumping to an incompatible version, adjust the documentation in `src/lib.rs`
version = "0.8.5"
version = "0.8.6"
authors = ["Simonas Kazlauskas <libloading@kazlauskas.me>"]
license = "ISC"
repository = "https://github.com/nagisa/rust_libloading/"
Expand All @@ -13,12 +13,13 @@ description = "Bindings around the platform's dynamic library loading primitives
keywords = ["dlopen", "load", "shared", "dylib"]
categories = ["api-bindings"]
rust-version = "1.56.0"
edition = "2015"

[target.'cfg(windows)'.dependencies.windows-targets]
version = ">=0.48, <0.53"

[target.'cfg(windows)'.dev-dependencies.windows-sys]
version = "0.52"
version = ">=0.52,<0.59"
features = ["Win32_Foundation"]

[target.'cfg(unix)'.dependencies.cfg-if]
Expand Down
10 changes: 5 additions & 5 deletions src/safe.rs
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ impl Library {
/// **awesome_variable = 42.0;
/// };
/// ```
pub unsafe fn get<'lib, T>(&'lib self, symbol: &[u8]) -> Result<Symbol<'lib, T>, Error> {
pub unsafe fn get<T>(&self, symbol: &[u8]) -> Result<Symbol<T>, Error> {
self.0.get(symbol).map(|from| Symbol::from_raw(from, self))
}

Expand Down Expand Up @@ -302,19 +302,19 @@ impl<'lib, T> Clone for Symbol<'lib, T> {
}

// FIXME: implement FnOnce for callable stuff instead.
impl<'lib, T> ops::Deref for Symbol<'lib, T> {
impl<T> ops::Deref for Symbol<'_, T> {
type Target = T;
fn deref(&self) -> &T {
ops::Deref::deref(&self.inner)
}
}

impl<'lib, T> fmt::Debug for Symbol<'lib, T> {
impl<T> fmt::Debug for Symbol<'_, T> {
fn fmt(&self, f: &mut fmt::Formatter) -> fmt::Result {
self.inner.fmt(f)
}
}

unsafe impl<'lib, T: Send> Send for Symbol<'lib, T> {}
unsafe impl<'lib, T: Sync> Sync for Symbol<'lib, T> {}
unsafe impl<T: Send> Send for Symbol<'_, T> {}
unsafe impl<T: Sync> Sync for Symbol<'_, T> {}

0 comments on commit 5102b4a

Please sign in to comment.