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

Cursor refactoring #248

Closed
wants to merge 10 commits into from
Closed

Cursor refactoring #248

wants to merge 10 commits into from

Conversation

zrzka
Copy link
Contributor

@zrzka zrzka commented Sep 23, 2019

  • Internal refactoring
    • No breaking changes except one - sys module is private
  • Forbids unused_must_use warning -> error
  • Improves documentation
    • Only the part available at docs.rs
    • Internal documentation not touched

You can check the documentation via cd crossterm_cursor && cargo doc --open.

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>
crossterm_cursor/src/cursor/windows.rs Outdated Show resolved Hide resolved
crossterm_cursor/src/cursor/ansi.rs Outdated Show resolved Hide resolved
crossterm_cursor/src/lib.rs Show resolved Hide resolved
crossterm_cursor/src/lib.rs Outdated Show resolved Hide resolved
crossterm_cursor/src/lib.rs Outdated Show resolved Hide resolved
crossterm_cursor/src/lib.rs Show resolved Hide resolved
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>
@TimonPost TimonPost mentioned this pull request Sep 23, 2019
5 tasks
Signed-off-by: Robert Vojta <rvojta@me.com>
@@ -226,7 +226,7 @@ pub fn clear_entire_screen(buffer_size: Size, current_attribute: u16) -> Result<
clear(start_location, cells_to_write, current_attribute)?;

// put the cursor back at cell 0,0
let cursor = Cursor::new()?;
let cursor = TerminalCursor::new();
Copy link
Member

Choose a reason for hiding this comment

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

We can use ScreenBufferCursor directly because we are using winapi here and thus there is no need to go through the abstraction of ansi/winapi

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Disagree here as it's an implementation detail of the crossterm_cursor crate (private sys module).

@TimonPost
Copy link
Member

TimonPost commented Sep 23, 2019

Should I wait for the series of refactors concerning the 'I' in the trait names before doing the 0.11 release? As long there are no breaking changes in those PR's we can move them to 0.11.1 as well

@zrzka
Copy link
Contributor Author

zrzka commented Sep 23, 2019

Should I wait for the series of refactors concerning the 'I' before doing the 0.11 release?

No need to wait because this refactoring is internal and doesn't change public API (except closing sys modules). Assuming similar situation is in other crates.

@TimonPost
Copy link
Member

TimonPost commented Sep 23, 2019

Let's move this over to 0.11.1, see #243, let's do the 0.11 release tomorrow. My guess is that nobody is using 'sys' altough am I allowed assuming such thing?

@zrzka
Copy link
Contributor Author

zrzka commented Sep 23, 2019

It's impossible to say if anyone is using it or not. It's a breaking change of the crossterm_cursor crate only, not the crossterm crate, because it doesn't reexport sys modules.

Anyway, this wasn't meant to be included in 0.11 release. It's mainly about cursor doc & refactor and to say if it's okay to use the same schema for other sub crates or if there's anything you'd like to change before I proceed with remaining sub crates (in separate PRs).

@zrzka
Copy link
Contributor Author

zrzka commented Sep 24, 2019

Closing. Same PR will be against separate repo once I finish separation tmw.

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.

2 participants