Skip to content

Commit 6942c4e

Browse files
authored
Fix awaitable_responses use of concurrent-arean in 32 bit platform (#145)
* Fix awaitable_responses use of concurrent-arean in 32 bit platform Signed-off-by: Jiahao XU <[email protected]> * ci: Add checking for armv7-unknown-linux-gnueabihf Signed-off-by: Jiahao XU <[email protected]> * Fix awaitable_responses Signed-off-by: Jiahao XU <[email protected]> * Fix doc in mod fs Signed-off-by: Jiahao XU <[email protected]> * Fix clippy in sftp-test-common lib.rs Signed-off-by: Jiahao XU <[email protected]> --------- Signed-off-by: Jiahao XU <[email protected]>
1 parent 4648114 commit 6942c4e

File tree

4 files changed

+6
-5
lines changed

4 files changed

+6
-5
lines changed

.github/workflows/rust.yml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,8 @@ jobs:
4040
args: "--exclude-features openssh",
4141
}
4242
- { target: x86_64-apple-darwin }
43-
- { target: x86_64-unknown-linux-gnu }
43+
- { target: x86_64-unknown-linux-gnu }
44+
- { target: armv7-unknown-linux-gnueabihf }
4445
steps:
4546
- uses: actions/checkout@v4
4647
- name: Install toolchain

openssh-sftp-client-lowlevel/src/awaitable_responses.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ pub(crate) type Awaitable<Buffer> = awaitable::Awaitable<Buffer, Response<Buffer
2828

2929
/// BITARRAY_LEN must be LEN / usize::BITS and LEN must be divisble by usize::BITS.
3030
const BITARRAY_LEN: usize = 2;
31-
const LEN: usize = 128;
31+
const LEN: usize = BITARRAY_LEN * (usize::BITS as usize);
3232

3333
pub(crate) type ArenaArc<Buffer> = concurrent_arena::ArenaArc<Awaitable<Buffer>, BITARRAY_LEN, LEN>;
3434

sftp-test-common/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ pub fn get_sftp_path() -> &'static Path {
4747
sftp_path.push("openssh-portable");
4848
sftp_path.push("sftp-server");
4949

50-
eprintln!("sftp_path = {:#?}", sftp_path);
50+
eprintln!("sftp_path = {sftp_path:#?}");
5151

5252
sftp_path
5353
})

src/fs/mod.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -52,8 +52,8 @@ impl Fs {
5252
/// Set current working dir.
5353
///
5454
/// * `cwd` - Can include `~`.
55-
/// If it is empty, then it is set to use the default
56-
/// directory set by the remote `sftp-server`.
55+
/// If it is empty, then it is set to use the default
56+
/// directory set by the remote `sftp-server`.
5757
pub fn set_cwd(&mut self, cwd: impl Into<PathBuf>) {
5858
self.cwd = cwd.into().into_boxed_path();
5959
}

0 commit comments

Comments
 (0)