Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion core/build_playerglobal/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ version.workspace = true
workspace = true

[dependencies]
convert_case = "0.9.0"
convert_case = "0.10.0"
proc-macro2 = "1.0.103"
quote = "1.0.42"
swf = { path = "../../swf" }
Expand Down
8 changes: 4 additions & 4 deletions core/build_playerglobal/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -214,12 +214,12 @@ fn flash_to_rust_string(path: &str, uppercase: bool, separator: &str) -> String
return component.to_string();
}

let mut without_boundaries = vec![Boundary::DigitUpper];
// Special case for classes ending in '3D' - we want to ave something like
let mut remove_boundaries = vec![Boundary::DigitUpper];
// Special case for classes ending in '3D' - we want to have something like
// 'vertex_buffer_3d' instead of 'vertex_buffer3d'
if !component.ends_with("3D") {
// Do not split on a letter followed by a digit, so e.g. `atan2` won't become `atan_2`.
without_boundaries.extend([Boundary::UpperDigit, Boundary::LowerDigit]);
remove_boundaries.extend([Boundary::UpperDigit, Boundary::LowerDigit]);
}

// For cases like `Vector$int`, so we don't have to put the native
Expand All @@ -228,7 +228,7 @@ fn flash_to_rust_string(path: &str, uppercase: bool, separator: &str) -> String

component
.from_case(Case::Camel)
.without_boundaries(&without_boundaries)
.remove_boundaries(&remove_boundaries)
.to_case(new_case)
})
.collect::<Vec<_>>();
Expand Down
Loading