Skip to content

Commit ec5af70

Browse files
fix: use #[derive(Default)] for BuildContext (#368)
Fixing cargo clippy error
1 parent c8e6fc4 commit ec5af70

File tree

2 files changed

+5
-8
lines changed
  • cargo-near-build/src/types/near

2 files changed

+5
-8
lines changed

cargo-near-build/src/types/near/build/input/mod.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,13 @@
22
use std::io::IsTerminal;
33

44
#[cfg(feature = "docker")]
5-
#[derive(Debug, Clone, Copy)]
5+
#[derive(Debug, Clone, Copy, Default)]
66
pub enum BuildContext {
7+
#[default]
78
Build,
8-
Deploy { skip_git_remote_check: bool },
9+
Deploy {
10+
skip_git_remote_check: bool,
11+
},
912
}
1013

1114
/// argument of [`build_with_cli`](crate::build_with_cli) function

cargo-near-build/src/types/near/docker_build/mod.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,12 +28,6 @@ pub struct Opts {
2828
pub context: BuildContext,
2929
}
3030

31-
impl Default for BuildContext {
32-
fn default() -> Self {
33-
Self::Build
34-
}
35-
}
36-
3731
pub const WARN_BECOMES_ERR: &str =
3832
"This WARNING becomes a hard ERROR when deploying contract with docker.";
3933

0 commit comments

Comments
 (0)