mirror of
https://github.com/servo/servo.git
synced 2025-08-03 04:30:10 +01:00
clippy: Fix redundant field names warnings (#31793)
This commit is contained in:
parent
f55d1d288e
commit
2789e98876
97 changed files with 285 additions and 314 deletions
|
@ -241,7 +241,7 @@ impl Tokenizer {
|
|||
receiver: tokenizer_receiver,
|
||||
html_tokenizer_sender: to_html_tokenizer_sender,
|
||||
nodes: HashMap::new(),
|
||||
url: url,
|
||||
url,
|
||||
parsing_algorithm: algorithm,
|
||||
};
|
||||
tokenizer.insert_node(0, Dom::from_ref(document.upcast()));
|
||||
|
@ -627,7 +627,7 @@ impl Sink {
|
|||
id: 0,
|
||||
qual_name: None,
|
||||
},
|
||||
sender: sender,
|
||||
sender,
|
||||
};
|
||||
let data = ParseNodeData::default();
|
||||
sink.insert_parse_node_data(0, data);
|
||||
|
@ -640,7 +640,7 @@ impl Sink {
|
|||
self.insert_parse_node_data(id, data);
|
||||
self.next_parse_node_id.set(id + 1);
|
||||
ParseNode {
|
||||
id: id,
|
||||
id,
|
||||
qual_name: None,
|
||||
}
|
||||
}
|
||||
|
|
|
@ -49,7 +49,7 @@ impl Tokenizer {
|
|||
document: Dom::from_ref(document),
|
||||
current_line: 1,
|
||||
script: Default::default(),
|
||||
parsing_algorithm: parsing_algorithm,
|
||||
parsing_algorithm,
|
||||
};
|
||||
|
||||
let options = TreeBuilderOpts {
|
||||
|
@ -75,7 +75,7 @@ impl Tokenizer {
|
|||
HtmlTokenizer::new(TreeBuilder::new(sink, options), Default::default())
|
||||
};
|
||||
|
||||
Tokenizer { inner: inner }
|
||||
Tokenizer { inner }
|
||||
}
|
||||
|
||||
#[must_use]
|
||||
|
|
|
@ -147,10 +147,7 @@ pub enum ParsingAlgorithm {
|
|||
|
||||
impl ElementAttribute {
|
||||
pub fn new(name: QualName, value: DOMString) -> ElementAttribute {
|
||||
ElementAttribute {
|
||||
name: name,
|
||||
value: value,
|
||||
}
|
||||
ElementAttribute { name, value }
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -765,8 +762,8 @@ impl ParserContext {
|
|||
ParserContext {
|
||||
parser: None,
|
||||
is_synthesized_document: false,
|
||||
id: id,
|
||||
url: url,
|
||||
id,
|
||||
url,
|
||||
resource_timing: ResourceFetchTiming::new(ResourceTimingType::Navigation),
|
||||
pushed_entry_index: None,
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue