mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
Derive ToCss for keyword structs
This commit is contained in:
parent
b0bc1d05a9
commit
3a2e79274a
2 changed files with 3 additions and 8 deletions
|
@ -142,6 +142,7 @@ fn where_predicate(ty: syn::Ty) -> syn::WherePredicate {
|
|||
/// If the first Camel segment is "Moz"" or "Webkit", the result string
|
||||
/// is prepended with "-".
|
||||
fn to_css_identifier(mut camel_case: &str) -> String {
|
||||
camel_case = camel_case.trim_right_matches('_');
|
||||
let mut first = true;
|
||||
let mut result = String::with_capacity(camel_case.len());
|
||||
while let Some(segment) = split_camel_segment(&mut camel_case) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue