[PR #362] [CLOSED] Fix compile error in TimeoutStream #1387

Closed
opened 2026-03-16 02:03:46 +03:00 by kerem · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/hickory-dns/hickory-dns/pull/362
Author: @oherrala
Created: 3/23/2018
Status: Closed

Base: masterHead: timeout-poll


📝 Commits (1)

  • 1b07a5c Fix compile error in TimeoutStream

📊 Changes

1 file changed (+7 additions, -4 deletions)

View changed files

📝 server/src/server/timeout_stream.rs (+7 -4)

📄 Description

Since TimeoutStream::timeout() returns Option we first need to check if timeout is None before calling timeout.poll().

I also took the liberty to replace drop(mem::replace(&mut self.timeout, timeout)) with more idiomatic self.timeout = timeout since I couldn't figure out why drop(mem::replace()) is used. I hope to get enlightened about this and can switch back if needed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/hickory-dns/hickory-dns/pull/362 **Author:** [@oherrala](https://github.com/oherrala) **Created:** 3/23/2018 **Status:** ❌ Closed **Base:** `master` ← **Head:** `timeout-poll` --- ### 📝 Commits (1) - [`1b07a5c`](https://github.com/hickory-dns/hickory-dns/commit/1b07a5cabbc821a99f8b508f1fee1a2433128c84) Fix compile error in TimeoutStream ### 📊 Changes **1 file changed** (+7 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `server/src/server/timeout_stream.rs` (+7 -4) </details> ### 📄 Description Since TimeoutStream::timeout() returns Option<Timeout> we first need to check if timeout is None before calling timeout.poll(). I also took the liberty to replace `drop(mem::replace(&mut self.timeout, timeout))` with more idiomatic `self.timeout = timeout` since I couldn't figure out why `drop(mem::replace())` is used. I hope to get enlightened about this and can switch back if needed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
kerem 2026-03-16 02:03:46 +03:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/hickory-dns#1387
No description provided.