Auto merge of #8685 - jmr0:master, r=Ms2ger

tidy rule to warn against use of &String and refactoring

Fixes #8681

<!-- Reviewable:start -->
[<img src="https://reviewable.io/review_button.png" height=40 alt="Review on Reviewable"/>](https://reviewable.io/reviews/servo/servo/8685)
<!-- Reviewable:end -->
This commit is contained in:
bors-servo 2015-11-27 04:48:38 +05:30
commit f96e8ce9e8
4 changed files with 11 additions and 7 deletions

View file

@ -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) {