fork/rust

git clone https://git.julia.blue/fork/rust

borsAuto merge of #72883 - Mark-Simulacrum:stable-next, r=Mark-Simulacrum49cae55760d

1.44.0
258 B15 linesraw
1#include <stddef.h>
2#include <stdint.h>
3
4struct ByteSlice {
5        uint8_t *data;
6        size_t len;
7};
8
9size_t slice_len(struct ByteSlice bs) {
10        return bs.len;
11}
12
13uint8_t slice_elem(struct ByteSlice bs, size_t idx) {
14        return bs.data[idx];
15}