Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refactor: remove wrapping Result #103

Closed

Conversation

hamirmahal
Copy link
Contributor

No description provided.

Comment on lines +29 to 33
pub fn new() -> Self {
let (thread_tx, thread_rx) = unbounded();
std::thread::spawn(|| events_processor(thread_rx));
Ok(Self { thread_tx })
Self { thread_tx }
}
Copy link
Contributor Author

Choose a reason for hiding this comment

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

The Result here appears unnecessary and used.

This shouldn't cause any external changes. The goal is to make the API a bit cleaner.

@hamirmahal
Copy link
Contributor Author

cargo test --all-features passes locally.

@FabianLars
Copy link
Member

The other platforms can return Errors though so this is required for the code to work on all platforms.

@FabianLars FabianLars closed this Sep 9, 2024
@hamirmahal hamirmahal deleted the refactor/remove-wrapping-result branch September 16, 2024 15:49
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