0
0
Fork 1
mirror of https://mau.dev/maunium/synapse.git synced 2024-12-17 05:43:50 +01:00

Merge pull request #2083 from matrix-org/erikj/copy_replace_speed

Speed up copy_and_replace
This commit is contained in:
Erik Johnston 2017-03-31 09:39:54 +01:00 committed by GitHub
commit 639d9ae9a0

View file

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