File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed
core/src/avm2/globals/flash/net Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,6 @@ use crate::avm2::value::Value;
99use crate :: avm2:: { Error , Object } ;
1010use crate :: backend:: navigator:: RequestOptions ;
1111use crate :: loader:: DataFormat ;
12- use crate :: string:: AvmString ;
1312use 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 ( ) ) ;
You can’t perform that action at this time.
0 commit comments