Skip to content

Commit 80599a5

Browse files
committed
Remove conflicting clear
1 parent 7271f39 commit 80599a5

File tree

2 files changed

+3
-1
lines changed

2 files changed

+3
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
- **(breaking)** [#184](https://github.com/jamwaffles/ssd1306/pull/184) Increased MSRV to 1.61.0
2020
- **(breaking)** [#179](https://github.com/jamwaffles/ssd1306/pull/179) Changed `Ssd1306::reset` signature.
2121
- [#181](https://github.com/jamwaffles/ssd1306/pull/181) Update embedded-graphics-core dependency to 0.4
22+
- **(breaking)** [#182](https://github.com/jamwaffles/ssd1306/pull/182) The inherent `BufferedGraphicsMode::clear` is no longer available when the `graphics` feature is enabled.
2223

2324
## [0.7.1] - 2022-08-15
2425

src/mode/buffered_graphics.rs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ where
5858

5959
/// Initialise and clear the display in graphics mode.
6060
fn init(&mut self) -> Result<(), DisplayError> {
61-
self.clear();
61+
self.clear_impl(false);
6262
self.init_with_addr_mode(AddrMode::Horizontal)
6363
}
6464
}
@@ -69,6 +69,7 @@ where
6969
SIZE: DisplaySize,
7070
{
7171
/// Clear the display buffer. You need to call `disp.flush()` for any effect on the screen
72+
#[cfg(not(feature = "graphics"))]
7273
pub fn clear(&mut self) {
7374
for b in self.mode.buffer.as_mut() {
7475
*b = 0;

0 commit comments

Comments
 (0)