Skip to content

Commit

Permalink
Optimize some "freeze" calls
Browse files Browse the repository at this point in the history
  • Loading branch information
Gene Gleyzer committed Sep 18, 2024
1 parent 65067a5 commit 77be4f7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ mixin ByteArray<Element extends Byte>
len += chLen;
}

return new String(chars.freeze()), index + len;
return new String(chars.freeze(inPlace=True)), index + len;
}


Expand Down
2 changes: 1 addition & 1 deletion lib_ecstasy/src/main/x/ecstasy/reflect/Enumeration.x
Original file line number Diff line number Diff line change
Expand Up @@ -125,6 +125,6 @@ const Enumeration<Value extends Enum>
map.put(name, instance);
}
}
return map.freeze();
return map.freeze(inPlace=True);
}
}
2 changes: 1 addition & 1 deletion lib_jsondb/src/main/x/jsondb/Client.x
Original file line number Diff line number Diff line change
Expand Up @@ -1900,7 +1900,7 @@ service Client<Schema extends RootSchema> {
DboInfo info = infoFor(id);
map.put(info.path.toString(), id);
}
return map.freeze();
return map.freeze(inPlace=True);
}

@Override
Expand Down
2 changes: 1 addition & 1 deletion lib_web/src/main/x/web/security/DigestAuthenticator.x
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ service DigestAuthenticator(Realm realm)
nonces = nonces.remove(nonces.keys.iterator().take());
}
} else {
nonces = new NonceTable().freeze();
nonces = new NonceTable().freeze(inPlace=True);
}

@Inject Clock clock;
Expand Down

0 comments on commit 77be4f7

Please sign in to comment.