Skip to content

Introduce #[css(if_empty = "…", iterable)] - #20230

Merged
bors-servo merged 2 commits into
masterfrom
derive-all-the-things
Mar 7, 2018
Merged

bors-servo merged 2 commits into
masterfrom
derive-all-the-things

Conversation

@nox

@nox nox commented Mar 7, 2018 •

Copy link
Copy Markdown
Contributor

This change is Reviewable

@highfive

highfive commented Mar 7, 2018

Copy link
Copy Markdown

Heads up! This PR modifies the following files:

  • @bholley: components/style/properties/helpers.mako.rs, components/style/values/specified/position.rs, components/style/values/specified/font.rs
  • @canaltinova: components/style/properties/helpers.mako.rs, components/style/values/specified/position.rs, components/style/values/specified/font.rs
  • @emilio: components/style/properties/helpers.mako.rs, components/style/values/specified/position.rs, components/style/values/specified/font.rs

@highfive highfive added the S-awaiting-review There is new code that needs to be reviewed. label Mar 7, 2018
@highfive

highfive commented Mar 7, 2018

Copy link
Copy Markdown

warning Warning warning

  • These commits modify style code, but no tests are modified. Please consider adding a test!

if let Some(if_empty) = attrs.if_empty {
return quote! {
{
let mut iter = #field.iter().peekable();

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There's no need to use peekable, right? You could just match on the first element returned and such... Not a big deal I guess.

% if not allow_empty:
#[css(iterable)]
% else:
#[css(if_empty = "none", iterable)]

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice, thanks for cleaning this up :)

@nox

nox commented Mar 7, 2018

Copy link
Copy Markdown
Contributor Author

@bors-servo

Copy link
Copy Markdown
Contributor

📌 Commit 90b2396 has been approved by emilio

@highfive highfive assigned emilio and unassigned cbrewster Mar 7, 2018
@highfive highfive added S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. and removed S-awaiting-review There is new code that needs to be reviewed. labels Mar 7, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

⌛ Testing commit 90b2396 with merge 2f4c13d...

bors-servo pushed a commit that referenced this pull request Mar 7, 2018
@bors-servo

Copy link
Copy Markdown
Contributor

☀️ Test successful - android, arm32, arm64, linux-dev, linux-rel-css, linux-rel-wpt, mac-dev-unit, mac-rel-css1, mac-rel-css2, mac-rel-wpt1, mac-rel-wpt2, mac-rel-wpt3, mac-rel-wpt4, windows-msvc-dev
Approved by: emilio
Pushing 2f4c13d to master...

@bors-servo
bors-servo merged commit 90b2396 into master Mar 7, 2018
@highfive highfive removed the S-awaiting-merge The PR is in the process of compiling and running tests on the automated CI. label Mar 7, 2018
@bors-servo bors-servo mentioned this pull request Mar 7, 2018
4 tasks done
@nox
nox deleted the derive-all-the-things branch March 7, 2018 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants