Skip to content

Commit

Permalink
Fix rebase conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
Philipp-M committed Oct 1, 2024
1 parent 0335e99 commit 6133a95
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions xilem_web/src/style.rs
Original file line number Diff line number Diff line change
Expand Up @@ -319,7 +319,7 @@ impl WithStyle for Styles {
}

fn get_style(&self, name: &str) -> Option<&CowStr> {
for modifier in self.style_modifiers[..self.idx].iter().rev() {
for modifier in self.style_modifiers[..self.idx as usize].iter().rev() {
match modifier {
StyleModifier::Remove(removed) if removed == name => return None,
StyleModifier::Set(key, value) if key == name => return Some(value),
Expand Down Expand Up @@ -535,7 +535,7 @@ where
fn build(&self, ctx: &mut ViewCtx) -> (Self::Element, Self::ViewState) {
let (mut element, state) = self.el.build(ctx);
let css_repr = modify_rotate_transform(element.get_style("transform"), self.radians);
element.set_style("transform".into(), css_repr.clone());
element.set_style(&"transform".into(), &css_repr);
element.mark_end_of_style_modifier();
(element, (state, css_repr))
}
Expand All @@ -552,7 +552,7 @@ where
if prev.radians != self.radians || element.was_updated("transform") {
*css_repr = modify_rotate_transform(element.get_style("transform"), self.radians);
}
element.set_style("transform".into(), css_repr.clone());
element.set_style(&"transform".into(), css_repr);
element.mark_end_of_style_modifier();
element
}
Expand Down Expand Up @@ -649,7 +649,7 @@ where
fn build(&self, ctx: &mut ViewCtx) -> (Self::Element, Self::ViewState) {
let (mut element, state) = self.el.build(ctx);
let css_repr = modify_scale_transform(element.get_style("transform"), self.scale);
element.set_style("transform".into(), css_repr.clone());
element.set_style(&"transform".into(), &css_repr);
element.mark_end_of_style_modifier();
(element, (state, css_repr))
}
Expand All @@ -666,7 +666,7 @@ where
if prev.scale != self.scale || element.was_updated("transform") {
*css_repr = modify_scale_transform(element.get_style("transform"), self.scale);
}
element.set_style("transform".into(), css_repr.clone());
element.set_style(&"transform".into(), css_repr);
element.mark_end_of_style_modifier();
element
}
Expand Down

0 comments on commit 6133a95

Please sign in to comment.