Skip to content

Commit a0beb14

Browse files
authored
inout: borrow instead of consuming in InOutBufReserved::get_*_len() methods (#734)
1 parent c49cca2 commit a0beb14

File tree

5 files changed

+50
-4
lines changed

5 files changed

+50
-4
lines changed

inout/CHANGELOG.md

+6
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.2 (2022-02-10)
8+
### Changed
9+
- Use borrow instead of consuming in `InOutBufReserved::get_*_len()` methods ([#734])
10+
11+
[#734]: https://github.com/RustCrypto/utils/pull/734
12+
713
## 0.1.1 (2022-02-10)
814
### Fixed
915
- Fix doc build on docs.rs by optionally enabling the `doc_cfg` feature ([#733])

inout/Cargo.lock

+40
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

inout/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "inout"
3-
version = "0.1.1" # Also update html_root_url in lib.rs when bumping this
3+
version = "0.1.2" # 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

+1-1
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.1"
8+
html_root_url = "https://docs.rs/inout/0.1.2"
99
)]
1010
#![allow(clippy::needless_lifetimes)]
1111
#![cfg_attr(docsrs, feature(doc_cfg))]

inout/src/reserved.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -84,13 +84,13 @@ impl<'a, T> InOutBufReserved<'a, 'a, T> {
8484

8585
/// Get input buffer length.
8686
#[inline(always)]
87-
pub fn get_in_len(self) -> usize {
87+
pub fn get_in_len(&self) -> usize {
8888
self.in_len
8989
}
9090

9191
/// Get output buffer length.
9292
#[inline(always)]
93-
pub fn get_out_len(self) -> usize {
93+
pub fn get_out_len(&self) -> usize {
9494
self.in_len
9595
}
9696
}

0 commit comments

Comments
 (0)