mirror of
https://github.com/NixOS/nix.git
synced 2025-11-14 06:22:42 +01:00
Rename and protect BufferedSink::write
The `write` name is ambiguous and could lead to some funny bugs like https://github.com/NixOS/nix/pull/8173#issuecomment-1500009480. So rename it to the more explicit `writeUnbuffered`. Besides, this method shouldn't be (and isn't) used outside of the class implementation, so mark it `protected`. This makes it more symetrical to `BufferedSource` which uses a `protected readUnbuffered` method.
This commit is contained in:
parent
9185639631
commit
214f1d6791
6 changed files with 14 additions and 12 deletions
|
|
@ -197,7 +197,7 @@ public:
|
|||
HashSink(HashType ht);
|
||||
HashSink(const HashSink & h);
|
||||
~HashSink();
|
||||
void write(std::string_view data) override;
|
||||
void writeUnbuffered(std::string_view data) override;
|
||||
HashResult finish() override;
|
||||
HashResult currentHash();
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue