Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-22.04, ubuntu-24.04]
rust_toolchain: [stable, beta]
runs-on: ${{ matrix.os }}
steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
os: [macos-14, macos-15, macos-26]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v1
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [windows-2019, windows-2022]
os: [windows-2022, windows-2025]
env:
- TARGET: x86_64-pc-windows-msvc
- TARGET: i686-pc-windows-msvc
Expand Down
1 change: 1 addition & 0 deletions libssh2-sys/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,7 @@ fn main() {
};
println!("cargo:rustc-link-lib=static={lib_prefix}ssl");
println!("cargo:rustc-link-lib=static={lib_prefix}crypto");
println!("cargo:rustc-link-lib=advapi32");
} else {
cfg.define("LIBSSH2_WINCNG", None);
}
Expand Down
4 changes: 2 additions & 2 deletions src/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ impl Channel {
}
}

fn lock(&self) -> LockedChannel {
fn lock(&self) -> LockedChannel<'_> {
let sess = self.channel_inner.sess.lock();
LockedChannel {
sess,
Expand Down Expand Up @@ -519,7 +519,7 @@ impl Drop for ChannelInner {
}

impl Stream {
fn lock(&self) -> LockedStream {
fn lock(&self) -> LockedStream<'_> {
let sess = self.channel_inner.sess.lock();
LockedStream {
sess,
Expand Down
4 changes: 2 additions & 2 deletions src/session.rs
Original file line number Diff line number Diff line change
Expand Up @@ -175,7 +175,7 @@ impl Session {
}

#[doc(hidden)]
pub fn raw(&self) -> MappedMutexGuard<raw::LIBSSH2_SESSION> {
pub fn raw(&self) -> MappedMutexGuard<'_, raw::LIBSSH2_SESSION> {
let inner = self.inner();
MutexGuard::map(inner, |inner| unsafe { &mut *inner.raw })
}
Expand Down Expand Up @@ -1113,7 +1113,7 @@ impl Session {
}
}

fn inner(&self) -> MutexGuard<SessionInner> {
fn inner(&self) -> MutexGuard<'_, SessionInner> {
self.inner.lock()
}

Expand Down
4 changes: 2 additions & 2 deletions src/sftp.rs
Original file line number Diff line number Diff line change
Expand Up @@ -435,7 +435,7 @@ impl Sftp {
})
}

fn lock(&self) -> Result<LockedSftp, Error> {
fn lock(&self) -> Result<LockedSftp<'_>, Error> {
match self.inner.as_ref() {
Some(sftp_inner_drop_wrapper) => {
let sftp_inner = sftp_inner_drop_wrapper
Expand Down Expand Up @@ -658,7 +658,7 @@ impl File {
self.rc(&locked, unsafe { raw::libssh2_sftp_fsync(locked.raw) })
}

fn lock(&self) -> Result<LockedFile, Error> {
fn lock(&self) -> Result<LockedFile<'_>, Error> {
match self.inner.as_ref() {
Some(file_inner) => {
let sftp_inner = file_inner.sftp.0.as_ref().expect(
Expand Down
4 changes: 2 additions & 2 deletions src/util.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ use std::path::Path;
use {raw, Error, ErrorCode};

#[cfg(unix)]
pub fn path2bytes(p: &Path) -> Result<Cow<[u8]>, Error> {
pub fn path2bytes(p: &Path) -> Result<Cow<'_, [u8]>, Error> {
use std::ffi::OsStr;
use std::os::unix::prelude::*;
let s: &OsStr = p.as_ref();
check(Cow::Borrowed(s.as_bytes()))
}
#[cfg(windows)]
pub fn path2bytes(p: &Path) -> Result<Cow<[u8]>, Error> {
pub fn path2bytes(p: &Path) -> Result<Cow<'_, [u8]>, Error> {
p.to_str()
.map(|s| s.as_bytes())
.ok_or_else(|| {
Expand Down
Loading