Skip to content

Commit e01af09

Browse files
author
Joshua Nelson
committed
Add compatibility for Rust 1.34
The latest version of rust packaged for Raspbian is 1.35, so this fix is needed in order for YDBRust to support Raspbian.
1 parent b691d32 commit e01af09

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/simple_api/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1158,7 +1158,8 @@ impl Key {
11581158

11591159
fn get_buffers_mut(&mut self) -> (ydb_buffer_t, Vec<ydb_buffer_t>) {
11601160
let var = ydb_buffer_t {
1161-
buf_addr: self.variable.as_mut_ptr() as *mut _,
1161+
// `str::as_mut_ptr` was only stabilized in 1.36
1162+
buf_addr: unsafe { self.variable.as_bytes_mut() }.as_mut_ptr() as *mut _,
11621163
len_alloc: self.variable.capacity() as u32,
11631164
len_used: self.variable.len() as u32,
11641165
};

0 commit comments

Comments
 (0)