Skip to content

Commit e37f5e0

Browse files
committed
fix: move non-alpha trim as last step
1 parent ed415b9 commit e37f5e0

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

stackslib/src/net/mod.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2489,15 +2489,15 @@ pub mod test {
24892489
name: ContractName::try_from(
24902490
conf.test_name
24912491
.replace("::", "-")
2492-
.trim_start_matches(|c: char| !c.is_alphabetic())
24932492
.chars()
2494-
// ensure auto-generated contract names are not too long
24952493
.skip(
24962494
conf.test_name
24972495
.len()
24982496
.saturating_sub(CONTRACT_MAX_NAME_LENGTH),
24992497
)
2500-
.collect::<String>(),
2498+
.collect::<String>()
2499+
.trim_start_matches(|c: char| !c.is_alphabetic())
2500+
.to_string(),
25012501
)
25022502
.expect("FATAL: invalid boot-code contract name"),
25032503
code_body: StacksString::from_str(&conf.setup_code)

0 commit comments

Comments
 (0)