0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2025-03-05 15:10:24 +01:00

Speed up copy_and_replace

This commit is contained in:
Erik Johnston 2017-03-30 17:50:31 +01:00
parent 0834d1a70c
commit 27b1b4a2c9

View file

@ -216,9 +216,7 @@ class StreamToken(
return self
def copy_and_replace(self, key, new_value):
d = self._asdict()
d[key] = new_value
return StreamToken(**d)
return self._replace(**{key: new_value})
StreamToken.START = StreamToken(