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

Make ServoMedia::get infallible #430

Merged
merged 1 commit into from
Jan 17, 2025

Conversation

simonwuelker
Copy link
Contributor

It was already infallible before, but returned
a Result type for unknown reasons. The relevant
Code hasn't been touched for 7 years.

I think the original intention was to make backend creation fallible, but as mentioned before
it currently isn't. And even if it were fallible it seems more reasonable to return a Result from
ServoMedia::init instead.

Copy link
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

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

Yeah, this is a bit silly!

It was already infallible before, but returned
a Result type for unknown reasons. The relevant
Code hasn't been touched for 7 years.

I think the original intention was to make backend
creation fallible, but as mentioned before
it currently isn't, and even if it were it
seems more reasonable to return a Result from
ServoMedia::init.

Signed-off-by: Simon Wülker <simon.wuelker@arcor.de>
@simonwuelker simonwuelker force-pushed the infallible-backend-get branch from 5888ecd to a9f4ab8 Compare January 17, 2025 02:48
@simonwuelker
Copy link
Contributor Author

Should we release a new crate version given that this is a breaking change or do we not care about that since servo-media isn't on crates.io?

@jdm
Copy link
Member

jdm commented Jan 17, 2025

We don't care about that since it's never been published.

@simonwuelker simonwuelker added this pull request to the merge queue Jan 17, 2025
Merged via the queue into servo:main with commit 1ff6758 Jan 17, 2025
3 checks passed
@simonwuelker simonwuelker deleted the infallible-backend-get branch January 17, 2025 03:16
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