mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2025-01-13 17:29:30 -05:00
Merge pull request #2083 from matrix-org/erikj/copy_replace_speed
Speed up copy_and_replace
This commit is contained in:
commit
639d9ae9a0
@ -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(
|
||||
|
Loading…
Reference in New Issue
Block a user