adding tidy rule to warn against use of &String and refactoring instances of &String in codebase

This commit is contained in:
jmr0 2015-11-25 21:49:12 -05:00
parent 8efc954531
commit df49cf2b13
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) {