fix: profile_tokio broken due to incompatible types #49
Reference in New Issue
Block a user
Delete Branch "fix/profile-tokio-incompatible-types"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary by CodeRabbit
📝 Walkthrough
Walkthrough
Profile-tokio branch in
src/core/task.rsnow maps a potentialJoinErrorintoeyre::Reportviamap_err(Into::into)when spawning, returningResult<JoinHandle<O>>. The non-profile-tokio path still returnsOk(spawn(...)). No public signatures changed.Changes
src/core/task.rscfg(profile_tokio)path, converttokio::spawn'sJoinErrorintoeyre::Reportusingmap_err(Into::into), returningResult<JoinHandle<O>>. The non-profile branch remainsOk(spawn(...)). No API/signature changes.Estimated code review effort
🎯 2 (Simple) | ⏱️ ~10 minutes
📜 Recent review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between
0451716e1eand5a597938f4.📒 Files selected for processing (1)
src/core/task.rs(1 hunks)🚧 Files skipped from review as they are similar to previous changes (1)
✨ Finishing Touches
🧪 Generate unit tests
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
❤️ Share
🪧 Tips
Chat
There are 3 ways to chat with CodeRabbit:
I pushed a fix in commit <commit_id>, please review it.Open a follow-up GitHub issue for this discussion.@coderabbitaiin a new review comment at the desired location with your query.@coderabbitaiin a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:@coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.@coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.Support
Need help? Create a ticket on our support page for assistance with any issues or questions.
CodeRabbit Commands (Invoked using PR/Issue comments)
Type
@coderabbitai helpto get the list of available commands.Other keywords and placeholders
@coderabbitai ignoreanywhere in the PR description to prevent this PR from being reviewed.@coderabbitai summaryto generate the high-level summary at a specific location in the PR description.@coderabbitaianywhere in the PR title to generate the title automatically.CodeRabbit Configuration File (
.coderabbit.yaml).coderabbit.yamlfile to the root of your repository.# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.jsonStatus, Documentation and Community
Actionable comments posted: 1
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
💡 Knowledge Base configuration:
You can enable these sources in your CodeRabbit configuration.
📥 Commits
Reviewing files that changed from the base of the PR and between
877a32ab09and0451716e1e.📒 Files selected for processing (1)
src/core/task.rs(1 hunks)@@ -17,6 +17,7 @@ pub fn new<#[cfg(feature = "profile_tokio")]⚠️ Potential issue
Fix: Builder::spawn returns JoinHandle, not Result; remove map_err and wrap in Ok(...)
.spawn(async_future)returnsJoinHandle<O>. There’s nothing to map viamap_err; this won’t compile. To keep the return typeResult<JoinHandle<O>>consistent with the non-profile_tokiobranch, wrap the spawn inOk(...).Apply this diff:
And wrap the whole expression in
Ok(...):🤖 Prompt for AI Agents
could you cargo format this? other than that it's good
has the code rabbit not helped us at all? if not I'm removing it
-------- Original Message --------
On 8/17/25 4:47 PM, Schmarni wrote:
this works perfectly, thanks!