提交 3c81fd0a authored 作者: Serhij S's avatar Serhij S

lints

上级 2f66b5f3
...@@ -129,6 +129,7 @@ pub struct StatCommand { ...@@ -129,6 +129,7 @@ pub struct StatCommand {
pub show_versions: bool, pub show_versions: bool,
} }
#[allow(clippy::struct_excessive_bools)]
#[derive(Parser)] #[derive(Parser)]
pub struct FlashCommand { pub struct FlashCommand {
#[clap(long, env = "CARGO", help = "cargo/cross binary path")] #[clap(long, env = "CARGO", help = "cargo/cross binary path")]
...@@ -205,6 +206,7 @@ pub struct RollbackCommand { ...@@ -205,6 +206,7 @@ pub struct RollbackCommand {
pub live: bool, pub live: bool,
} }
#[allow(clippy::struct_excessive_bools)]
pub struct FlashExec { pub struct FlashExec {
pub cargo: Option<PathBuf>, pub cargo: Option<PathBuf>,
pub cargo_target: Option<String>, pub cargo_target: Option<String>,
......
...@@ -87,6 +87,7 @@ fn flash_file( ...@@ -87,6 +87,7 @@ fn flash_file(
} }
} else { } else {
#[derive(Serialize)] #[derive(Serialize)]
#[allow(clippy::struct_excessive_bools)]
struct Payload { struct Payload {
#[serde(skip_serializing_if = "std::ops::Not::not")] #[serde(skip_serializing_if = "std::ops::Not::not")]
force: bool, force: bool,
......
...@@ -18,6 +18,9 @@ static TARGET_PACKAGE_VERSION: OnceCell<String> = OnceCell::new(); ...@@ -18,6 +18,9 @@ static TARGET_PACKAGE_VERSION: OnceCell<String> = OnceCell::new();
static CARGO_TARGET_DIR: OnceCell<String> = OnceCell::new(); static CARGO_TARGET_DIR: OnceCell<String> = OnceCell::new();
/// # Panics
///
/// Panics if `CARGO_TARGET_DIR` is not set
pub fn cargo_target_dir() -> &'static str { pub fn cargo_target_dir() -> &'static str {
CARGO_TARGET_DIR.get().expect("CARGO_TARGET_DIR not set") CARGO_TARGET_DIR.get().expect("CARGO_TARGET_DIR not set")
} }
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论