iced icon indicating copy to clipboard operation
iced copied to clipboard

`iced::font::Error` should implement `std::error::Error`

Open Cookie04DE opened this issue 10 months ago • 3 comments

Is there an existing issue for this?

  • [X] I have searched the existing issues.

Is this issue related to iced?

  • [X] My hardware is compatible and my graphics drivers are up-to-date.

What happened?

I tried using iced::font::Error as a dyn std::error::Error and noticed that the trait is not implemented.

What is the expected behavior?

iced::font::Error should implement std::error::Error since it is an error.

Version

crates.io release

Operating System

Windows

Do you have any log output?

No response

Cookie04DE avatar Aug 24 '23 11:08 Cookie04DE

Well, its also an empty Enum which means that it can't be constructed (at least safely). So no errors!?

thunderstorm010 avatar Aug 24 '23 19:08 thunderstorm010

Huh, weird, but you're right. Guess it's currently impossible for font loading to fail. Nevertheless, if this is gonna change, the enum should start implementing the Error trait.

Cookie04DE avatar Aug 24 '23 22:08 Cookie04DE

I think it's provided for compatibility purposes until an actual error is there. We need to change glyphon a bit, I've sent some screenshots in #water-cooler

Cookie04DE @.***> schrieb am Fr., 25. Aug. 2023, 1:20 AM:

Huh, weird, but you're right. Guess it's currently impossible for font loading to fail. Nevertheless, if this is gonna change, the enum should start implementing the Error trait.

— Reply to this email directly, view it on GitHub https://github.com/iced-rs/iced/issues/2049#issuecomment-1692489129, or unsubscribe https://github.com/notifications/unsubscribe-auth/APZN7JZUJLDAV33HFQ2YEALXW7HUBANCNFSM6AAAAAA344JZ7I . You are receiving this because you commented.Message ID: @.***>

thunderstorm010 avatar Aug 25 '23 06:08 thunderstorm010