Skip to content

Commit d840e1a

Browse files
authored
Merge pull request #38 from Zondax/fix_clippy
comment out unused method
2 parents e22570b + 3e6729a commit d840e1a

File tree

4 files changed

+18
-18
lines changed

4 files changed

+18
-18
lines changed

bolos-derive/src/utils.rs

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
********************************************************************************/
1616
use proc_macro_error::emit_error;
1717
use syn::{
18-
punctuated::Punctuated, spanned::Spanned, visit::Visit, Attribute, Error, GenericArgument,
18+
punctuated::Punctuated, spanned::Spanned, visit::Visit, Attribute, GenericArgument,
1919
GenericParam, Generics, Ident, Type, TypePath,
2020
};
2121

@@ -31,20 +31,20 @@ pub trait SynIteratorExtend: Iterator {
3131
})
3232
}
3333

34-
fn syn_try_fold<C, T>(mut self) -> Result<C, Error>
35-
where
36-
Self: Sized,
37-
Self: Iterator<Item = Result<T, Error>>,
38-
C: Extend<T> + Default,
39-
{
40-
self.try_fold(C::default(), |mut acc, x| match x {
41-
Ok(x) => {
42-
acc.extend(std::iter::once(x));
43-
Ok(acc)
44-
}
45-
Err(e) => Err(e),
46-
})
47-
}
34+
// fn syn_try_fold<C, T>(mut self) -> Result<C, Error>
35+
// where
36+
// Self: Sized,
37+
// Self: Iterator<Item = Result<T, Error>>,
38+
// C: Extend<T> + Default,
39+
// {
40+
// self.try_fold(C::default(), |mut acc, x| match x {
41+
// Ok(x) => {
42+
// acc.extend(std::iter::once(x));
43+
// Ok(acc)
44+
// }
45+
// Err(e) => Err(e),
46+
// })
47+
// }
4848
}
4949

5050
impl<I: Iterator> SynIteratorExtend for I {}

bolos/src/flash_slot.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ pub const SLOT_SIZE: usize = PAGE_SIZE - COUNTER_SIZE - CRC_SIZE;
2424

2525
pub const ZEROED_STORAGE: [u8; PAGE_SIZE] = Slot::zeroed().as_storage();
2626

27-
struct Slot<'nvm> {
27+
struct Slot<'nvm> {
2828
pub counter: u64,
2929
payload: &'nvm [u8; SLOT_SIZE],
3030
crc: u32,

zemu/src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
extern crate cfg_if;
2727

2828
/// cbindgen:ignore
29-
mod bindings {
29+
mod bindings {
3030
extern "C" {
3131
cfg_if! {
3232
if #[cfg(zemu_sdk)] {

zemu/src/ui_toolkit.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -441,7 +441,7 @@ fn strlen(s: &[u8]) -> Result<usize, StrNotNullTerminated> {
441441
}
442442

443443
/// This function returns the index of the first null byte if found
444-
fn c_strlen(s: *const u8, max: usize) -> Result<usize, StrNotNullTerminated> {
444+
fn c_strlen(s: *const u8, max: usize) -> Result<usize, StrNotNullTerminated> {
445445
let mut count = 0;
446446
loop {
447447
if count >= max {

0 commit comments

Comments
 (0)