-
Notifications
You must be signed in to change notification settings - Fork 13.1k
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
Fix 13933 #14487
Fix 13933 #14487
Conversation
|
||
// A version of seek that takes &self so that tell can call it | ||
// - the private seek should of course take &mut self. | ||
fn _seek(&self, pos: i64, style: io::SeekStyle) -> Result<u64, IoError> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think the convention would be for something like seek_inner
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(Or seek_common
like below.)
The IO libraries casted self to mut so they can pass it to seek(SEEK_CUR, 0). Fix this by introducing a private seek function that takes &self - of course one should be careful with it if he lacks an exclusive reference to self.
Improved indentation |
directly use the internal pointer instead.
I will do Arena and Slice in separate commits |
Fix issue #13933 in a few files. A more complete fix would require core::raw::MutSlice.
…=Veykril fix: insert whitespace between text and pound Because `text#`, `text"..."`, and `text'...'` are [reserved syntax since Rust 2021][guide]. Note that the latter two are already handled correctly. Fixes rust-lang#14487 [guide]: https://doc.rust-lang.org/edition-guide/rust-2021/reserving-syntax.html
Fix issue #13933 in a few files. A more complete fix would require core::raw::MutSlice.