File tree Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Expand file tree Collapse file tree 4 files changed +7
-5
lines changed Original file line number Diff line number Diff line change 25
25
set -e
26
26
set -x
27
27
28
- CONTAINER=shiftcrypto/firmware_v2:32
28
+ CONTAINER=shiftcrypto/firmware_v2:33
29
29
30
30
if [ " $1 " == " pull" ] ; then
31
31
docker pull " $CONTAINER "
Original file line number Diff line number Diff line change @@ -130,7 +130,7 @@ RUN rustup target add thumbv7em-none-eabi
130
130
RUN rustup component add rustfmt
131
131
RUN rustup component add clippy
132
132
RUN CARGO_HOME=/opt/cargo cargo install cbindgen --version 0.24.3
133
- RUN CARGO_HOME=/opt/cargo cargo install bindgen-cli --version 0.64.0
133
+ RUN CARGO_HOME=/opt/cargo cargo install bindgen-cli --version 0.65.1
134
134
135
135
COPY tools/prost-build-proto prost-build-proto
136
136
RUN CARGO_HOME=/opt/cargo cargo install --path prost-build-proto --locked
Original file line number Diff line number Diff line change @@ -18,8 +18,10 @@ use alloc::vec::Vec;
18
18
/// Parses a utf-8 string out of a null terminated buffer. Returns `Err(())` if there
19
19
/// is no null terminator or if the bytes before the null terminator is invalid UTF8.
20
20
pub fn str_from_null_terminated ( input : & [ u8 ] ) -> Result < & str , ( ) > {
21
- let len = input. iter ( ) . position ( |& c| c == 0 ) . ok_or ( ( ) ) ?;
22
- core:: str:: from_utf8 ( & input[ 0 ..len] ) . or ( Err ( ( ) ) )
21
+ core:: ffi:: CStr :: from_bytes_until_nul ( input)
22
+ . or ( Err ( ( ) ) ) ?
23
+ . to_str ( )
24
+ . or ( Err ( ( ) ) )
23
25
}
24
26
25
27
/// Parses a utf-8 string out of a null terminated buffer starting at `ptr`. Returns `Err(())` if
Original file line number Diff line number Diff line change 1
- 1.68 .0
1
+ 1.69 .0
You can’t perform that action at this time.
0 commit comments