mirror of
https://github.com/servo/servo.git
synced 2025-08-08 06:55:31 +01:00
Cleanup some old code
This commit is contained in:
parent
3a4bd24549
commit
c145dd7b0c
3 changed files with 16 additions and 25 deletions
|
@ -81,16 +81,13 @@ impl Parse for TrackSize<LengthOrPercentage> {
|
|||
/// Parse the grid line names into a vector of owned strings.
|
||||
///
|
||||
/// https://drafts.csswg.org/css-grid/#typedef-line-names
|
||||
pub fn parse_line_names<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Vec<String>, ParseError<'i>> {
|
||||
pub fn parse_line_names<'i, 't>(input: &mut Parser<'i, 't>) -> Result<Vec<CustomIdent>, ParseError<'i>> {
|
||||
input.expect_square_bracket_block()?;
|
||||
input.parse_nested_block(|input| {
|
||||
let mut values = vec![];
|
||||
while let Ok(ident) = input.try(|i| i.expect_ident()) {
|
||||
if CustomIdent::from_ident((&*ident).into(), &["span"]).is_err() {
|
||||
return Err(StyleParseError::UnspecifiedError.into())
|
||||
}
|
||||
|
||||
values.push(ident.into_owned());
|
||||
let ident = CustomIdent::from_ident(ident, &["span"])?;
|
||||
values.push(ident);
|
||||
}
|
||||
|
||||
Ok(values)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue