Skip to content

Commit

Permalink
redundant field names in struct initialization
Browse files Browse the repository at this point in the history
  • Loading branch information
six-shot authored and mrobinson committed Mar 27, 2024
1 parent 9b50a6b commit ccc4ac1
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
8 changes: 4 additions & 4 deletions components/script/dom/audiotrack.rs
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,10 @@ impl AudioTrack {
) -> AudioTrack {
AudioTrack {
reflector_: Reflector::new(),
id: id,
kind: kind,
label: label,
language: language,
id,
kind,
label,
language,
enabled: Cell::new(false),
track_list: DomRefCell::new(track_list.map(Dom::from_ref)),
}
Expand Down
6 changes: 3 additions & 3 deletions components/script/dom/macros.rs
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ macro_rules! make_form_action_getter(
use $crate::dom::bindings::inheritance::Castable;
use $crate::dom::element::Element;
let element = self.upcast::<Element>();
let doc = crate::dom::node::document_from_node(self);
let doc = $crate::dom::node::document_from_node(self);
let attr = element.get_attribute(&html5ever::ns!(), &html5ever::local_name!($htmlname));
let value = attr.as_ref().map(|attr| attr.value());
let value = match value {
Expand Down Expand Up @@ -205,7 +205,7 @@ macro_rules! make_uint_setter(
fn $attr(&self, value: u32) {
use $crate::dom::bindings::inheritance::Castable;
use $crate::dom::element::Element;
use crate::dom::values::UNSIGNED_LONG_MAX;
use $crate::dom::values::UNSIGNED_LONG_MAX;
let value = if value > UNSIGNED_LONG_MAX {
$default
} else {
Expand All @@ -226,7 +226,7 @@ macro_rules! make_limited_uint_setter(
fn $attr(&self, value: u32) -> $crate::dom::bindings::error::ErrorResult {
use $crate::dom::bindings::inheritance::Castable;
use $crate::dom::element::Element;
use crate::dom::values::UNSIGNED_LONG_MAX;
use $crate::dom::values::UNSIGNED_LONG_MAX;
let value = if value == 0 {
return Err($crate::dom::bindings::error::Error::IndexSize);
} else if value > UNSIGNED_LONG_MAX {
Expand Down

0 comments on commit ccc4ac1

Please sign in to comment.