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

Fixed compilation issues #95

Closed
wants to merge 3 commits into from
Closed

Conversation

Kyllingene
Copy link

@Kyllingene Kyllingene commented Jan 4, 2023

In src/context.rs, Context::read_line_with_init_buffer had a borrow bug where self.key_bindings was read after it was borrowed by Editor::new_with_init_buffer. I fixed the issue by copying the attribute to a new variable beforehand. Fixes #96.

In src/history.rs:297:29, you typed [0u8, 4096], when you meant to write [0u8; 4096], and thus Rust thought you were trying to create a two-byte array with the contents [0, 4096], as opposed to a 4096-byte array with zeroed contents. Fixes #84.

@Kyllingene Kyllingene changed the title Fixed compilation issue at src/context.rs:98:20 Fixed compilation issues Jan 4, 2023
@iamcodemaker
Copy link
Contributor

You may want to see #94. This repo hasn't seen any activity for years.

@Kyllingene
Copy link
Author

That stinks; liner on crates.io still points here. Thanks for the notice, though.

@Kyllingene Kyllingene closed this Jan 22, 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.

Fails to compile, due to a borrowing bug in Context::read_line_with_init_buffer
2 participants