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

API Cleanup - part 1 #235

Merged
merged 5 commits into from
Sep 19, 2019
Merged

API Cleanup - part 1 #235

merged 5 commits into from
Sep 19, 2019

Conversation

zrzka
Copy link
Contributor

@zrzka zrzka commented Sep 18, 2019

  • ITerminalCursor::pos() returns Result<(u16, u16)>
  • ITerminal::size() returns Result<(u16, u16)>
  • ITerminal::scroll_up() & scroll_down() & set_size() accepts u16 instead of i16
  • Fixed Travis CI examples check
    • Tried with set -e, but it didn't work - fails immediately
    • Have to place it in a separate script
  • TerminalCursor::move_* returns Result

Fixes #200
Fixes #201

Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Signed-off-by: Robert Vojta <rvojta@me.com>
Copy link
Contributor

@MonsieurMan MonsieurMan left a comment

Choose a reason for hiding this comment

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

Good job, using result is a great addition, leading to more idiomatic and discovereable API user wise and internally.

I was navigating through the repo after my PR and I figured I'd be more than happy to help with this crate, I really like the way it goes and how light it is !

@TimonPost TimonPost merged commit 41de9a6 into crossterm-rs:master Sep 19, 2019
@zrzka zrzka deleted the zrzka/api-cleanup branch September 19, 2019 11:56
december1981 pushed a commit to december1981/crossterm that referenced this pull request Oct 26, 2023
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.

Terminal::set_size & terminal_size i16 vs u16 Terminal::terminal_size() vs size()
3 participants