Skip to content

Add a blanket From<E: IntoReport<Local>> impl for MainReport - #198

Merged
TethysSvensson merged 1 commit into
rootcause-rs:mainfrom
funsafemath:main
Aug 16, 2026
Merged

Add a blanket From<E: IntoReport<Local>> impl for MainReport#198
TethysSvensson merged 1 commit into
rootcause-rs:mainfrom
funsafemath:main

Conversation

@funsafemath

Copy link
Copy Markdown
Contributor

MainReport current From impl is

impl<C: ?Sized + 'static, O: 'static, T: 'static> From<Report<C, O, T>> for MainReport {

which doesn't allow something like

fn main() -> Result<(), MainReport> {
    fs::read("file")?;
    Ok(())
}

to compile without converting the errors to reports manually or wrapping the main function

@TethysSvensson

Copy link
Copy Markdown
Contributor

Thanks!

@TethysSvensson
TethysSvensson added this pull request to the merge queue Aug 16, 2026
Merged via the queue into rootcause-rs:main with commit 46b4acf Aug 16, 2026
16 checks passed
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