-
Notifications
You must be signed in to change notification settings - Fork 72
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
Some general cleanup, address clear
conflict
#185
Conversation
clear
conflict
My opinion on this matter might not be important, but I really don't like the idea of removing a method when a feature is added. |
I'm interested in other ways of resolving the conflict while preserving the ability to clear the display without embedded-graphics, if you have any. |
My solution would be to just require e-g for the buffered graphics mode. I think that most users will use e-g anyway and it isn't a huge dependency if you don't want to use e-g and just set pixels. But I'm not sure everyone would like this approach. |
If the buffered mode is changed to use e-g internally (see #169) e-g will become a mandatory dependency anyway. |
My concern is that requiring e-g for the buffered graphics mode will require other potential graphics libraries to implement a compatibility display mode for this driver. While e-g's framebuffer is a good general idea, this display is pretty much designed to work with a framebuffer, or at least to draw rectangles of pixels to it. I expect a built-in framebuffer to remain useful without embedded-graphics, especially considering the current status of the library. The underlying issue in my opinion is the poor naming of While I agree that removing methods by enabling a feature is inconvenient, and has a sizeable surprise factor, the only other viable solution I see is to rename it. But I would prefer other solutions as I feel like |
The name |
Considering that |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks 🙏
Hi! Thank you for helping out with SSD1306 development! Please:
master
if you're not already up to dateCHANGELOG.md
entry in the Unreleased section under the appropriate heading (Added, Fixed, Changed, etc)rustfmt
on the project withcargo fmt --all
- CI will not pass without this stepPR description
This PR is a set of smaller changes extracted from the other pending pull requests, that are otherwise independent of the bigger changes proposed.
A few notes:
DrawTarget::clear
is difficult in buffered graphics mode #174 by removing the inherentclear
function toclear_buffer
. This new name is hopefully more descriptive.allow(dead_code)
on a type that doesn't have dead code warnings.