Skip to content

chore: simplify TaskExt usage#63

Merged
AsakuraMizu merged 1 commit intomainfrom
simplify-task-ext
Dec 1, 2025
Merged

chore: simplify TaskExt usage#63
AsakuraMizu merged 1 commit intomainfrom
simplify-task-ext

Conversation

@AsakuraMizu
Copy link
Contributor

I didn't know that orphan rules do not consider Box<T> as a remote type. See https://doc.rust-lang.org/reference/items/implementations.html#r-items.impl.trait.fundamental.

Copilot AI review requested due to automatic review settings November 30, 2025 09:42
Copy link
Contributor

Copilot AI left a comment

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 simplifies the TaskExt implementation by leveraging Rust's orphan rule exemption for fundamental types like Box<T>. The refactoring eliminates the ThreadInner/Thread wrapper pattern by implementing TaskExt directly on Box<Thread>.

Key changes:

  • Renamed ThreadInner to Thread and removed the wrapper type
  • Changed TaskExt implementation from Thread to Box<Thread>
  • Modified Thread::new() to return Box<Thread> directly

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

@AsakuraMizu AsakuraMizu merged commit 4bff807 into main Dec 1, 2025
18 checks passed
@AsakuraMizu AsakuraMizu deleted the simplify-task-ext branch December 1, 2025 04:43
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.

3 participants