Skip to content

Commit 7c13c9a

Browse files
committed
Few fixes
1 parent 48dd970 commit 7c13c9a

File tree

6 files changed

+10
-10
lines changed

6 files changed

+10
-10
lines changed

ledger_device_sdk/src/ecc.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,7 @@ impl<const N: usize, const TY: char> ECPrivateKey<N, TY> {
189189
/// [here](https://blog.rust-lang.org/inside-rust/2021/09/06/Splitting-const-generics.html#featuregeneric_const_exprs)
190190
pub fn public_key(&self) -> Result<ECPublicKey<{ Self::P }, TY>, CxError>
191191
where
192-
[(); Self::P]:,
192+
[(); Self::P]: Sized,
193193
{
194194
let mut pubkey = ECPublicKey::<{ Self::P }, TY>::new(self.curve);
195195
let err = unsafe {

ledger_device_sdk/src/io.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -407,7 +407,7 @@ impl Comm {
407407
G_ux_params.u.pairing_request.pairing_info_len = (_len - 2) as u32;
408408
for i in 0..G_ux_params.u.pairing_request.pairing_info_len as usize {
409409
G_ux_params.u.pairing_request.pairing_info[i as usize] =
410-
seph_buffer[5 + i] as i8;
410+
seph_buffer[5 + i] as u8;
411411
}
412412
G_ux_params.u.pairing_request.pairing_info
413413
[G_ux_params.u.pairing_request.pairing_info_len as usize] = 0;

ledger_device_sdk/src/libcall/swap.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@ pub fn get_check_address_params<
156156
debug_print("==> GET_REF_ADDRESS\n");
157157
let mut address_length = 0usize;
158158
let mut c = unsafe { *(params.address_to_check.add(address_length)) };
159-
while c != '\0' as i8 && address_length < ADDRESS_BUF_SIZE {
159+
while c != '\0' as u8 && address_length < ADDRESS_BUF_SIZE {
160160
check_address_params.ref_address[address_length] = c as u8;
161161
address_length += 1;
162162
c = unsafe { *(params.address_to_check.add(address_length)) };
@@ -224,7 +224,7 @@ pub fn get_printable_amount_params<
224224
debug_print("==> GET_AMOUNT_STR\n");
225225
printable_amount_params.amount_str = unsafe {
226226
&(*(libarg.__bindgen_anon_1.get_printable_amount as *mut get_printable_amount_parameters_t))
227-
.printable_amount as *const i8 as *mut i8
227+
.printable_amount as *const u8 as *mut i8
228228
};
229229

230230
printable_amount_params
@@ -285,7 +285,7 @@ pub fn sign_tx_params<const COIN_CONFIG_BUF_SIZE: usize, const ADDRESS_BUF_SIZE:
285285
debug_print("==> GET_DESTINATION_ADDRESS\n");
286286
let mut dest_address_length = 0usize;
287287
let mut c = unsafe { *params.destination_address.add(dest_address_length) };
288-
while c != '\0' as i8 && dest_address_length < ADDRESS_BUF_SIZE {
288+
while c != '\0' as u8 && dest_address_length < ADDRESS_BUF_SIZE {
289289
create_tx_params.dest_address[dest_address_length] = c as u8;
290290
dest_address_length += 1;
291291
c = unsafe { *params.destination_address.add(dest_address_length) };

ledger_device_sdk/src/nbgl/nbgl_review.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -80,8 +80,8 @@ impl<'a> NbglReview<'a> {
8080
let mut tag_value_array: Vec<nbgl_contentTagValue_t> = Vec::new();
8181
for field in v.iter() {
8282
let val = nbgl_contentTagValue_t {
83-
item: field.name.as_ptr() as *const i8,
84-
value: field.value.as_ptr() as *const i8,
83+
item: field.name.as_ptr() as *const ::core::ffi::c_char,
84+
value: field.value.as_ptr() as *const ::core::ffi::c_char,
8585
..Default::default()
8686
};
8787
tag_value_array.push(val);

ledger_device_sdk/src/nbgl/nbgl_streaming_review.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -101,8 +101,8 @@ impl NbglStreamingReview {
101101
let mut tag_value_array: Vec<nbgl_contentTagValue_t> = Vec::new();
102102
for field in v.iter() {
103103
let val = nbgl_contentTagValue_t {
104-
item: field.name.as_ptr() as *const i8,
105-
value: field.value.as_ptr() as *const i8,
104+
item: field.name.as_ptr() as *const ::core::ffi::c_char,
105+
value: field.value.as_ptr() as *const ::core::ffi::c_char,
106106
..Default::default()
107107
};
108108
tag_value_array.push(val);

rust-toolchain.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
[toolchain]
2-
channel = "nightly-2024-12-01"
2+
channel = "nightly"

0 commit comments

Comments
 (0)