Skip to content

Commit d4549cd

Browse files
authored
inout: fix InOutBufReserved::get_out_len (#1150)
This PR is a backport of #1147 for inout v0.1.
1 parent 81ef0b0 commit d4549cd

File tree

4 files changed

+9
-3
lines changed

4 files changed

+9
-3
lines changed

inout/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
44
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
55
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
66

7+
## 0.1.4 (2025-02-21)
8+
### Fixed
9+
- Return output length from `InOutBufReserved::get_out_len` instead of input length ([#1150])
10+
11+
[#1150]: https://github.com/RustCrypto/utils/pull/1150
12+
713
## 0.1.3 (2022-03-31)
814
### Fixed
915
- MIRI error in `From` impl for `InOutBuf` ([#755])

inout/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "inout"
3-
version = "0.1.3" # Also update html_root_url in lib.rs when bumping this
3+
version = "0.1.4" # Also update html_root_url in lib.rs when bumping this
44
description = "Custom reference types for code generic over in-place and buffer-to-buffer modes of operation."
55
authors = ["RustCrypto Developers"]
66
license = "MIT OR Apache-2.0"

inout/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
#![doc(
66
html_logo_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
77
html_favicon_url = "https://raw.githubusercontent.com/RustCrypto/media/8f1a9894/logo.svg",
8-
html_root_url = "https://docs.rs/inout/0.1.3"
8+
html_root_url = "https://docs.rs/inout/0.1.4"
99
)]
1010
#![allow(clippy::needless_lifetimes)]
1111
#![cfg_attr(docsrs, feature(doc_cfg))]

inout/src/reserved.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -91,7 +91,7 @@ impl<'a, T> InOutBufReserved<'a, 'a, T> {
9191
/// Get output buffer length.
9292
#[inline(always)]
9393
pub fn get_out_len(&self) -> usize {
94-
self.in_len
94+
self.out_len
9595
}
9696
}
9797

0 commit comments

Comments
 (0)