Skip to content

Commit 613a255

Browse files
Aaron1011Herschel
authored andcommitted
Use binary literal
1 parent d3689de commit 613a255

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

core/src/avm2/globals/flash/net/url_loader.rs

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ use crate::avm2::value::Value;
99
use crate::avm2::{Error, Object};
1010
use crate::backend::navigator::RequestOptions;
1111
use crate::loader::DataFormat;
12-
use crate::string::AvmString;
1312
use gc_arena::{GcCell, MutationContext};
1413

1514
/// Implements `flash.net.URLLoader`'s class constructor.
@@ -101,11 +100,11 @@ fn load<'gc>(
101100
.get_property(&QName::dynamic_name("dataFormat").into(), activation)?
102101
.coerce_to_string(activation)?;
103102

104-
let data_format = if data_format == AvmString::from("binary") {
103+
let data_format = if &data_format == b"binary" {
105104
DataFormat::Binary
106-
} else if data_format == AvmString::from("text") {
105+
} else if &data_format == b"text" {
107106
DataFormat::Text
108-
} else if data_format == AvmString::from("variables") {
107+
} else if &data_format == b"variables" {
109108
DataFormat::Variables
110109
} else {
111110
return Err(format!("Unknown data format: {}", data_format).into());

0 commit comments

Comments
 (0)