mirror of
https://git.anonymousland.org/anonymousland/synapse.git
synced 2024-10-01 11:49:51 -04:00
Speed up copy_and_replace
This commit is contained in:
parent
0834d1a70c
commit
27b1b4a2c9
@ -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(
|
||||||
|
Loading…
Reference in New Issue
Block a user