mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
Apply suggestions from code review
Signed-off-by: Xiaocheng Hu <xiaochengh.work@gmail.com>
This commit is contained in:
parent
2d2419539f
commit
2d5818f616
1 changed files with 2 additions and 2 deletions
|
@ -95,7 +95,7 @@ impl Default for ViewportDescription {
|
||||||
|
|
||||||
impl ViewportDescription {
|
impl ViewportDescription {
|
||||||
/// Iterates over the key-value pairs generated from meta tag and returns a ViewportDescription
|
/// Iterates over the key-value pairs generated from meta tag and returns a ViewportDescription
|
||||||
fn process_viewport_key_value_pair(pairs: HashMap<String, String>) -> ViewportDescription {
|
fn process_viewport_key_value_pairs(pairs: HashMap<String, String>) -> ViewportDescription {
|
||||||
let mut description = ViewportDescription::default();
|
let mut description = ViewportDescription::default();
|
||||||
for (key, value) in &pairs {
|
for (key, value) in &pairs {
|
||||||
match key.as_str() {
|
match key.as_str() {
|
||||||
|
@ -170,6 +170,6 @@ impl FromStr for ViewportDescription {
|
||||||
})
|
})
|
||||||
.collect::<HashMap<String, String>>();
|
.collect::<HashMap<String, String>>();
|
||||||
|
|
||||||
Ok(Self::process_viewport_key_value_pair(parsed_values))
|
Ok(Self::process_viewport_key_value_pairs(parsed_values))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue