Skip to content

Commit 81ef0b0

Browse files
authored
inout: release v0.1.3 (#756)
1 parent aa6bb32 commit 81ef0b0

File tree

6 files changed

+20
-14
lines changed

6 files changed

+20
-14
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.3 (2022-03-31)
8+
### Fixed
9+
- MIRI error in `From` impl for `InOutBuf` ([#755])
10+
11+
[#755]: https://github.com/RustCrypto/utils/pull/755
12+
713
## 0.1.2 (2022-02-10)
814
### Changed
915
- Use borrow instead of consuming in `InOutBufReserved::get_*_len()` methods ([#734])

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.2" # Also update html_root_url in lib.rs when bumping this
3+
version = "0.1.3" # 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/inout.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,10 +78,10 @@ impl<'inp, 'out, T: Clone> InOut<'inp, 'out, T> {
7878
impl<'a, T> From<&'a mut T> for InOut<'a, 'a, T> {
7979
#[inline(always)]
8080
fn from(val: &'a mut T) -> Self {
81-
let out_ptr = val as *mut T;
81+
let p = val as *mut T;
8282
Self {
83-
in_ptr: out_ptr as *const T,
84-
out_ptr,
83+
in_ptr: p,
84+
out_ptr: p,
8585
_pd: PhantomData,
8686
}
8787
}

inout/src/inout_buf.rs

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,10 +18,10 @@ pub struct InOutBuf<'inp, 'out, T> {
1818
impl<'a, T> From<&'a mut [T]> for InOutBuf<'a, 'a, T> {
1919
#[inline(always)]
2020
fn from(buf: &'a mut [T]) -> Self {
21-
let out_ptr = buf.as_mut_ptr();
21+
let p = buf.as_mut_ptr();
2222
Self {
23-
in_ptr: out_ptr,
24-
out_ptr: out_ptr,
23+
in_ptr: p,
24+
out_ptr: p,
2525
len: buf.len(),
2626
_pd: PhantomData,
2727
}
@@ -32,10 +32,10 @@ impl<'a, T> InOutBuf<'a, 'a, T> {
3232
/// Create `InOutBuf` from a single mutable reference.
3333
#[inline(always)]
3434
pub fn from_mut(val: &'a mut T) -> InOutBuf<'a, 'a, T> {
35-
let out_ptr = val as *mut T;
35+
let p = val as *mut T;
3636
Self {
37-
in_ptr: out_ptr as *const T,
38-
out_ptr,
37+
in_ptr: p,
38+
out_ptr: p,
3939
len: 1,
4040
_pd: PhantomData,
4141
}

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

inout/src/reserved.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,11 @@ impl<'a, T> InOutBufReserved<'a, 'a, T> {
2828
if msg_len > buf.len() {
2929
return Err(OutIsTooSmallError);
3030
}
31-
let out_ptr = buf.as_mut_ptr();
31+
let p = buf.as_mut_ptr();
3232
let out_len = buf.len();
3333
Ok(Self {
34-
in_ptr: out_ptr as *const T,
35-
out_ptr,
34+
in_ptr: p,
35+
out_ptr: p,
3636
in_len: msg_len,
3737
out_len,
3838
_pd: PhantomData,

0 commit comments

Comments
 (0)