Skip to content

Commit 0d8a489

Browse files
committed
Fill in pointer cast type
1 parent e693c49 commit 0d8a489

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ impl Buffer {
104104
/// representation within the buffer.
105105
#[cfg_attr(feature = "no-panic", no_panic)]
106106
pub fn format<I: Integer>(&mut self, i: I) -> &str {
107-
let buf_ptr = self.bytes.as_mut_ptr().cast();
107+
let buf_ptr = self.bytes.as_mut_ptr().cast::<I::Buffer>();
108108
let string = i.write(unsafe { &mut *buf_ptr });
109109
if string.len() > I::MAX_STR_LEN {
110110
unsafe { hint::unreachable_unchecked() };

0 commit comments

Comments
 (0)