Skip to content

Commit e055466

Browse files
authored
Make all library modules public (esp-rs#182)
* Make all library modules public * make clippy happy
1 parent cfaa2e3 commit e055466

File tree

6 files changed

+26
-11
lines changed

6 files changed

+26
-11
lines changed

espflash/src/cli/mod.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,7 @@ pub fn board_info(opts: ConnectOpts, config: Config) -> Result<()> {
112112
Ok(())
113113
}
114114

115+
#[allow(clippy::too_many_arguments)]
115116
pub fn save_elf_as_image(
116117
chip: Chip,
117118
elf_data: &[u8],
@@ -209,6 +210,7 @@ pub fn save_elf_as_image(
209210
Ok(())
210211
}
211212

213+
#[allow(clippy::too_many_arguments)]
212214
pub fn flash_elf_image(
213215
flasher: &mut Flasher,
214216
elf_data: &[u8],

espflash/src/flash_target/esp8266.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,12 @@ impl Esp8266Target {
1414
}
1515
}
1616

17+
impl Default for Esp8266Target {
18+
fn default() -> Self {
19+
Self::new()
20+
}
21+
}
22+
1723
impl FlashTarget for Esp8266Target {
1824
fn begin(&mut self, connection: &mut Connection, _image: &FirmwareImage) -> Result<(), Error> {
1925
connection.command(Command::FlashBegin {

espflash/src/flash_target/ram.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,12 @@ impl RamTarget {
2222
}
2323
}
2424

25+
impl Default for RamTarget {
26+
fn default() -> Self {
27+
Self::new()
28+
}
29+
}
30+
2531
impl FlashTarget for RamTarget {
2632
fn begin(&mut self, _connection: &mut Connection, image: &FirmwareImage) -> Result<(), Error> {
2733
self.entry = Some(image.entry());

espflash/src/flasher.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -443,6 +443,7 @@ impl Flasher {
443443
}
444444

445445
/// Load an elf image to flash and execute it
446+
#[allow(clippy::too_many_arguments)]
446447
pub fn load_elf_to_flash_with_format(
447448
&mut self,
448449
elf_data: &[u8],

espflash/src/image_format/mod.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ struct SegmentHeader {
3333
length: u32,
3434
}
3535

36-
pub trait ImageFormat<'a> {
36+
pub trait ImageFormat<'a>: Send {
3737
/// Get the rom segments needed when flashing to device
3838
fn flash_segments<'b>(&'b self) -> Box<dyn Iterator<Item = RomSegment<'b>> + 'b>
3939
where

espflash/src/lib.rs

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -6,16 +6,16 @@ pub use flasher::{FlashSize, Flasher};
66
pub use image_format::ImageFormatId;
77
pub use partition_table::PartitionTable;
88

9-
mod chip;
10-
mod command;
11-
mod connection;
12-
mod elf;
13-
mod encoder;
14-
mod error;
15-
mod flash_target;
16-
mod flasher;
17-
mod image_format;
18-
mod partition_table;
9+
pub mod chip;
10+
pub mod command;
11+
pub mod connection;
12+
pub mod elf;
13+
pub mod encoder;
14+
pub mod error;
15+
pub mod flash_target;
16+
pub mod flasher;
17+
pub mod image_format;
18+
pub mod partition_table;
1919

2020
#[doc(hidden)]
2121
pub mod cli;

0 commit comments

Comments
 (0)