mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:57:46 +00:00
LibCore: Remove Stream::is_{readable,writable}
Next to functions like `is_eof` these were really confusing to use, and the `read`/`write` functions should fail anyways if a stream is not readable/writable.
This commit is contained in:
parent
5a346c4297
commit
5061a905ff
7 changed files with 1 additions and 32 deletions
|
@ -65,7 +65,6 @@ void displayln() { user_display("\n", 1); }
|
|||
|
||||
class UserDisplayStream final : public Core::Stream::Stream {
|
||||
virtual ErrorOr<Bytes> read(Bytes) override { return Error::from_string_view("Not readable"sv); };
|
||||
virtual bool is_writable() const override { return true; }
|
||||
virtual ErrorOr<size_t> write(ReadonlyBytes bytes) override
|
||||
{
|
||||
user_display(bit_cast<char const*>(bytes.data()), bytes.size());
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue