Skip to content

refactor!: remove exn::Error#23

Merged
tisonkun merged 4 commits into
fast:mainfrom
andylokandy:dev-3
Jan 15, 2026
Merged

refactor!: remove exn::Error#23
tisonkun merged 4 commits into
fast:mainfrom
andylokandy:dev-3

Conversation

@andylokandy

Copy link
Copy Markdown
Contributor

No description provided.

Comment thread exn/src/lib.rs
Comment thread exn/src/result.rs
andylokandy and others added 2 commits January 15, 2026 00:11
Signed-off-by: tison <wander4096@gmail.com>

@tisonkun tisonkun left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM.

@andylokandy shall we release a 0.3.0 after this patch merged? Or we may cut a 0.3.0-rc.0 for testing first.

Comment thread exn/src/lib.rs
/// ```
#[expect(non_snake_case)]
pub fn Ok<T, E: Error + 'static>(value: T) -> Result<T, E> {
pub fn Ok<T, E: std::error::Error + 'static>(value: T) -> Result<T, E> {

@andylokandy andylokandy Jan 15, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Should we use std::error::Error to keep consistent?

@tisonkun tisonkun Jan 15, 2026

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

This is in the lib.rs, so I'd make an exception to avoid use crate::Error, an alias to std::error:Error, which can cause more ambiguity.

Perhaps we can move this function to a new file and pub use it at lib.rs, while use std::error::Error in that file. But let's do it later?

@tisonkun

Copy link
Copy Markdown
Contributor

I'll merge this now and release a 0.3.0-rc.1

@tisonkun tisonkun merged commit 5296119 into fast:main Jan 15, 2026
9 checks passed
@tisonkun

Copy link
Copy Markdown
Contributor

Failed to compile due to Send + Sync bound needed. Perhaps we'd revert this PR while keep removing Any.

@tisonkun tisonkun mentioned this pull request Jan 15, 2026
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