Skip to content

cleanup: remove unnecessary comments - #20

Merged
SeaRoll merged 1 commit into
masterfrom
cleanup-comments
Jan 24, 2026
Merged

cleanup: remove unnecessary comments#20
SeaRoll merged 1 commit into
masterfrom
cleanup-comments

Conversation

@SeaRoll

@SeaRoll SeaRoll commented Jan 24, 2026

Copy link
Copy Markdown
Owner

No description provided.

@SeaRoll
SeaRoll requested a review from Copilot January 24, 2026 22:17

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

This PR removes unnecessary comments from src/lib.rs to improve code readability and reduce clutter. The comments being removed are either overly explanatory for straightforward code or provide information that is already clear from the code itself.

Changes:

  • Removed section separator comment for Error and Waker definitions
  • Removed redundant documentation and inline comments from the spawn_task! macro
  • Removed verbose explanatory comments from test helper functions and test setup

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/lib.rs
@@ -42,7 +41,6 @@ unsafe fn nop_clone(_data: *const ()) -> RawWaker {
}
static VTABLE: RawWakerVTable = RawWakerVTable::new(nop_clone, nop, nop, nop);

Copilot AI Jan 24, 2026

Copy link

Choose a reason for hiding this comment

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

The removal of documentation for the Task type alias leaves it without explanation. This type alias involves complex Rust concepts (Pin, trait objects, lifetime parameters) that would benefit from documentation explaining its purpose as a pinned future for the task queue.

Suggested change
/// A pinned, dynamically-dispatched future representing a single task.
///
/// This alias is the internal task type stored in the [`Spawner`]’s queue and
/// wrapped by [`TaskHandle`]. It is a `Pin`ned mutable reference to a trait
/// object implementing [`core::future::Future`] with `Output = ()`, and is
/// required to be both `Send` and `Sync` so it can be safely scheduled.
///
/// The lifetime parameter `'a` is the lifetime of the underlying borrowed
/// future. Using `Pin` ensures that the future will not be moved in memory
/// while it is being polled by the runtime.

Copilot uses AI. Check for mistakes.
@SeaRoll
SeaRoll merged commit 4542a30 into master Jan 24, 2026
4 checks passed
@SeaRoll
SeaRoll deleted the cleanup-comments branch January 24, 2026 22:18
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