Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fwiw, ubuntu-latest-arm is not a thing somehow.

toolchain: [1.84.0]
include:
- os: windows-latest
Expand Down
6 changes: 3 additions & 3 deletions src/hg_connect_http.rs
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ unsafe extern "C" fn trace_log_callback(
CURLINFO_HEADER_OUT => logging::Direction::Send,
_ => return 0,
};
let data = std::slice::from_raw_parts(data as *const u8, size);
let data = std::slice::from_raw_parts(data as *const _, size);
for line in data.lines() {
trace!(target: target, "{} {}", direction, line.as_bstr());
}
Expand Down Expand Up @@ -647,7 +647,7 @@ unsafe extern "C" fn http_request_execute(
) -> usize {
let data = (data as *mut HttpThreadData).as_mut().unwrap();
http_send_info(data);
let buf = std::slice::from_raw_parts(ptr as *const u8, size.checked_mul(nmemb).unwrap());
let buf = std::slice::from_raw_parts(ptr as *const _, size.checked_mul(nmemb).unwrap());
if let Some(logger) = &mut data.logger {
logger.write_all(buf).unwrap();
}
Expand Down Expand Up @@ -863,7 +863,7 @@ unsafe extern "C" fn read_from_read<R: Read>(
data: *const c_void,
) -> usize {
let read = (data as *mut R).as_mut().unwrap();
let buf = std::slice::from_raw_parts_mut(ptr as *mut u8, size.checked_mul(nmemb).unwrap());
let buf = std::slice::from_raw_parts_mut(ptr as *mut _, size.checked_mul(nmemb).unwrap());
read.read(buf).unwrap()
}

Expand Down
2 changes: 1 addition & 1 deletion src/libcinnabar.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ pub struct strslice<'a> {

impl strslice<'_> {
pub fn as_bytes(&self) -> &[u8] {
unsafe { std::slice::from_raw_parts(self.buf as *const u8, self.len) }
unsafe { std::slice::from_raw_parts(self.buf as *const _, self.len) }
}
}

Expand Down
2 changes: 1 addition & 1 deletion src/libgit.rs
Original file line number Diff line number Diff line change
Expand Up @@ -316,7 +316,7 @@ impl<T: ?Sized> Drop for FfiBox<T> {

impl From<strbuf> for FfiBox<[u8]> {
fn from(value: strbuf) -> Self {
let ptr = value.buf as *mut u8;
let ptr = value.buf as *mut _;
let len = value.len;
mem::forget(value);
unsafe { FfiBox::from_raw_parts(ptr, len) }
Expand Down
2 changes: 1 addition & 1 deletion src/store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1477,7 +1477,7 @@ pub fn store_git_tree(tree_buf: &[u8], reference: Option<TreeId>) -> TreeId {
let mut reftree_buf = ptr::null_mut();
let mut len = 0;
unpack_object_entry(oe, &mut reftree_buf, &mut len);
ref_tree = Some(FfiBox::from_raw_parts(reftree_buf as *mut u8, len as usize));
ref_tree = Some(FfiBox::from_raw_parts(reftree_buf as *mut _, len as usize));
}
}
let mut result = object_id::default();
Expand Down
Loading