mirror of
https://github.com/servo/servo.git
synced 2025-07-22 23:03:42 +01:00
Remove some as_slice calls.
This commit is contained in:
parent
4ee89363fb
commit
6a55ae06d7
34 changed files with 79 additions and 79 deletions
|
@ -28,7 +28,7 @@ impl MIMEClassifier {
|
|||
return self.sniff_unknown_type(!no_sniff, data);
|
||||
}
|
||||
Some((ref media_type, ref media_subtype)) => {
|
||||
match (media_type.as_slice(), media_subtype.as_slice()) {
|
||||
match (&**media_type, &**media_subtype) {
|
||||
("uknown", "unknown") | ("application", "uknown") | ("*", "*") => {
|
||||
return self.sniff_unknown_type(!no_sniff,data);
|
||||
}
|
||||
|
@ -50,14 +50,14 @@ impl MIMEClassifier {
|
|||
.or(supplied_type.clone());
|
||||
}
|
||||
|
||||
if media_type.as_slice() == "image" {
|
||||
if &**media_type == "image" {
|
||||
let tp = self.image_classifier.classify(data);
|
||||
if tp.is_some() {
|
||||
return tp;
|
||||
}
|
||||
}
|
||||
|
||||
match (media_type.as_slice(), media_subtype.as_slice()) {
|
||||
match (&**media_type, &**media_subtype) {
|
||||
("audio", _) | ("video", _) | ("application", "ogg") => {
|
||||
let tp = self.audio_video_classifer.classify(data);
|
||||
if tp.is_some() {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue