mirror of
https://github.com/servo/servo.git
synced 2025-06-06 16:45:39 +00:00
adding tidy rule to warn against use of &String and refactoring instances of &String in codebase
This commit is contained in:
parent
8efc954531
commit
df49cf2b13
4 changed files with 11 additions and 7 deletions
|
@ -129,8 +129,8 @@ impl MIMEClassifier {
|
|||
}
|
||||
}
|
||||
|
||||
fn get_media_type(media_type: &String,
|
||||
media_subtype: &String) -> Option<MediaType> {
|
||||
fn get_media_type(media_type: &str,
|
||||
media_subtype: &str) -> Option<MediaType> {
|
||||
if MIMEClassifier::is_xml(media_type, media_subtype) {
|
||||
Some(MediaType::Xml)
|
||||
} else if MIMEClassifier::is_html(media_type, media_subtype) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue