We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent e693c49 commit 0d8a489Copy full SHA for 0d8a489
1 file changed
src/lib.rs
@@ -104,7 +104,7 @@ impl Buffer {
104
/// representation within the buffer.
105
#[cfg_attr(feature = "no-panic", no_panic)]
106
pub fn format<I: Integer>(&mut self, i: I) -> &str {
107
- let buf_ptr = self.bytes.as_mut_ptr().cast();
+ let buf_ptr = self.bytes.as_mut_ptr().cast::<I::Buffer>();
108
let string = i.write(unsafe { &mut *buf_ptr });
109
if string.len() > I::MAX_STR_LEN {
110
unsafe { hint::unreachable_unchecked() };
0 commit comments