Skip to content

add async write_all method#48304

Merged
jkarneges merged 1 commit intomainfrom
jkarneges/write-all
Feb 11, 2026
Merged

add async write_all method#48304
jkarneges merged 1 commit intomainfrom
jkarneges/write-all

Conversation

@jkarneges
Copy link
Member

@jkarneges jkarneges commented Feb 10, 2026

We'll use this to write log messages to a socket.

I think this might be the first time I've used async fn in a trait, and apparently the feature has a lint due to Send bound ambiguity which I've allowed since this isn't a library.

@jkarneges jkarneges requested a review from a team February 10, 2026 22:40
@@ -464,7 +508,11 @@ mod tests {
}

fn is_writable(&self) -> bool {
Copy link
Collaborator

@deg4uss3r deg4uss3r Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So just to double check logic expectations here, any integer that is not 0 and a None means we can write to the buffer?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah. This is in the test code, and I wanted a way to optionally restrict writes in the added test. So all the other tests leave it default None, meaning no restrictions, but the added test sets specific limits.

@jkarneges jkarneges merged commit e604861 into main Feb 11, 2026
19 checks passed
@jkarneges jkarneges deleted the jkarneges/write-all branch February 11, 2026 16:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants