Skip to content

Commit

Permalink
make Defmt error variant conditional on cli feature
Browse files Browse the repository at this point in the history
  • Loading branch information
haileys committed Jan 19, 2024
1 parent a226594 commit a5bd248
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions espflash/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ use strum::{FromRepr, VariantNames};
use thiserror::Error;

use crate::{
cli::monitor::parser::esp_defmt::DefmtError,
command::CommandType,
flasher::{FlashFrequency, FlashSize},
image_format::ImageFormatKind,
Expand Down Expand Up @@ -176,9 +175,10 @@ pub enum Error {
#[diagnostic(transparent)]
UnsupportedImageFormat(#[from] UnsupportedImageFormatError),

#[cfg(feature = "cli")]
#[error(transparent)]
#[diagnostic(transparent)]
Defmt(#[from] DefmtError),
Defmt(#[from] crate::cli::monitor::parser::esp_defmt::DefmtError),

#[error("Verification of flash content failed")]
#[diagnostic(code(espflash::verify_failed))]
Expand Down

0 comments on commit a5bd248

Please sign in to comment.