Skip to content

Commit

Permalink
Rename get_position to position
Browse files Browse the repository at this point in the history
  • Loading branch information
jamwaffles committed Jun 7, 2021
1 parent 7ad39b2 commit cc790ee
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@

- **(breaking)** [#150](https://github.com/jamwaffles/ssd1306/pull/150) `BufferedGraphicsMode::set_pixel` now accepts a `bool` instead of a `u8` for the pixel color value.
- **(breaking)** [#150](https://github.com/jamwaffles/ssd1306/pull/150) `display_on` is now called `set_display_on`.
- **(breaking)** [#150](https://github.com/jamwaffles/ssd1306/pull/150) `TerminalMode::get_position` is now called `position` to conform with Rust API guidelines.
- **(breaking)** [#150](https://github.com/jamwaffles/ssd1306/pull/150) Refactor the crate API to be more versatile and to make code clearer to understand.

A graphics mode initialisation now looks like this:
Expand Down
2 changes: 1 addition & 1 deletion src/mode/terminal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ where

/// Get the current cursor position, in character coordinates.
/// This is the (column, row) that the next character will be written to.
pub fn get_position(&self) -> Result<(u8, u8), TerminalModeError> {
pub fn position(&self) -> Result<(u8, u8), TerminalModeError> {
self.mode
.cursor
.as_ref()
Expand Down

0 comments on commit cc790ee

Please sign in to comment.