Skip to content

Commit 4a0b894

Browse files
committed
refactor(add): Pull out feature count for reuse
1 parent 1f34b00 commit 4a0b894

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cargo/ops/cargo_add/mod.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ use crate::CargoResult;
4343
use crate::GlobalContext;
4444
use crate_spec::CrateSpec;
4545

46+
const MAX_FEATURE_PRINTS: usize = 30;
47+
4648
/// Information on what dependencies should be added
4749
#[derive(Clone, Debug)]
4850
pub struct AddOptions<'a> {
@@ -1114,7 +1116,6 @@ fn print_dep_table_msg(shell: &mut Shell, dep: &DependencyUI) -> CargoResult<()>
11141116

11151117
writeln!(stderr, "{prefix}Features{suffix}:")?;
11161118

1117-
const MAX_FEATURE_PRINTS: usize = 30;
11181119
let total_activated = activated.len();
11191120
let total_deactivated = deactivated.len();
11201121

0 commit comments

Comments
 (0)