@@ -245,27 +245,27 @@ impl<'gc> Namespace<'gc> {
245
245
) ) )
246
246
}
247
247
248
- pub fn is_public ( & self ) -> bool {
248
+ pub fn is_public ( self ) -> bool {
249
249
matches ! ( self . 0 . as_deref( ) , Some ( NamespaceData :: Namespace ( name, _) ) if name. as_wstr( ) . is_empty( ) )
250
250
}
251
251
252
- pub fn is_public_ignoring_ns ( & self ) -> bool {
252
+ pub fn is_public_ignoring_ns ( self ) -> bool {
253
253
matches ! ( self . 0 . as_deref( ) , Some ( NamespaceData :: Namespace ( _, _) ) )
254
254
}
255
255
256
- pub fn is_any ( & self ) -> bool {
256
+ pub fn is_any ( self ) -> bool {
257
257
self . 0 . is_none ( )
258
258
}
259
259
260
- pub fn is_private ( & self ) -> bool {
260
+ pub fn is_private ( self ) -> bool {
261
261
matches ! ( self . 0 . as_deref( ) , Some ( NamespaceData :: Private ( _) ) )
262
262
}
263
263
264
- pub fn is_namespace ( & self ) -> bool {
264
+ pub fn is_namespace ( self ) -> bool {
265
265
matches ! ( self . 0 . as_deref( ) , Some ( NamespaceData :: Namespace ( _, _) ) )
266
266
}
267
267
268
- pub fn as_uri_opt ( & self ) -> Option < AvmString < ' gc > > {
268
+ pub fn as_uri_opt ( self ) -> Option < AvmString < ' gc > > {
269
269
self . 0 . map ( |data| match * data {
270
270
NamespaceData :: Namespace ( a, _) => a. into ( ) ,
271
271
NamespaceData :: PackageInternal ( a) => a. into ( ) ,
@@ -279,7 +279,7 @@ impl<'gc> Namespace<'gc> {
279
279
/// Get the string value of this namespace, ignoring its type.
280
280
///
281
281
/// TODO: Is this *actually* the namespace URI?
282
- pub fn as_uri ( & self , context : & mut StringContext < ' gc > ) -> AvmString < ' gc > {
282
+ pub fn as_uri ( self , context : & mut StringContext < ' gc > ) -> AvmString < ' gc > {
283
283
self . as_uri_opt ( ) . unwrap_or_else ( || context. empty ( ) )
284
284
}
285
285
@@ -289,7 +289,7 @@ impl<'gc> Namespace<'gc> {
289
289
///
290
290
/// Namespace does not implement `PartialEq`, so that each caller is required
291
291
/// to explicitly choose either `exact_version_match` or `matches_ns`.
292
- pub fn exact_version_match ( & self , other : Self ) -> bool {
292
+ pub fn exact_version_match ( self , other : Self ) -> bool {
293
293
if self . 0 . map ( Gc :: as_ptr) == other. 0 . map ( Gc :: as_ptr) {
294
294
true
295
295
} else if self . is_private ( ) || other. is_private ( ) {
@@ -304,7 +304,7 @@ impl<'gc> Namespace<'gc> {
304
304
/// seen by the other). This is used to implement `PropertyMap`, where we want to
305
305
/// a definition with `ApiVersion::SWF_16` to be visible when queried from
306
306
/// a SWF with `ApiVersion::SWF_16` or any higher version.
307
- pub fn matches_ns ( & self , other : Self ) -> bool {
307
+ pub fn matches_ns ( self , other : Self ) -> bool {
308
308
if self . exact_version_match ( other) {
309
309
return true ;
310
310
}
@@ -321,7 +321,7 @@ impl<'gc> Namespace<'gc> {
321
321
_ => false ,
322
322
}
323
323
}
324
- pub fn matches_api_version ( & self , match_version : ApiVersion ) -> bool {
324
+ pub fn matches_api_version ( self , match_version : ApiVersion ) -> bool {
325
325
match self . 0 . as_deref ( ) {
326
326
Some ( NamespaceData :: Namespace ( _, version) ) => version <= & match_version,
327
327
_ => true ,
0 commit comments