str: Implement trait Mutable for ~str with the method .clear()#7904
Closed
bluss wants to merge 6 commits intorust-lang:masterfrom
bluss:str-clear
Closed
str: Implement trait Mutable for ~str with the method .clear()#7904bluss wants to merge 6 commits intorust-lang:masterfrom bluss:str-clear
bluss wants to merge 6 commits intorust-lang:masterfrom
bluss:str-clear
Conversation
`rustpkg build`, if executed in a package source directory inside a workspace, will now build that package. By "inside a workspace" I mean that the parent directory has to be called `src`, and rustpkg will create a `build` directory in .. if there isn't already one. Same goes for `rustpkg install` and `rustpkg clean`. For the time being, `rustpkg build` (etc.) will still error out if you run it inside a directory whose parent isn't called `src`. I'm not sure whether or not it's desirable to have it do something in a non-workspace directory.
src/libstd/str.rs
Outdated
Contributor
There was a problem hiding this comment.
You could just leave this if expression out, because set_len(self, 0) will be a no-op if it's already zero.
Contributor
Author
There was a problem hiding this comment.
The thinking was that I wanted to have an assertion that there is room for the final null byte, in case the representation changes. This seemed to be the best way to keep the code safe and independent.
Too much overcommit here exhausts the low fd limit on OS X.
Contributor
Author
|
This should be revived and come back better, actually implement Container on ~str and @str too. |
Too much overcommit here exhausts the low fd limit on OS X.
r? @brson `rustpkg build`, if executed in a package source directory inside a workspace, will now build that package. By "inside a workspace" I mean that the parent directory has to be called `src`, and rustpkg will create a `build` directory in .. if there isn't already one. Same goes for `rustpkg install` and `rustpkg clean`. For the time being, `rustpkg build` (etc.) will still error out if you run it inside a directory whose parent isn't called `src`. I'm not sure whether or not it's desirable to have it do something in a non-workspace directory.
Some notes about the commits. Exit code propagation commits: * ```Reimplement unwrap()``` has the same old code from ```arc::unwrap``` ported to use modern atomic types and finally (it's considerably nicer this way) * ```Add try_unwrap()``` has some new slightly-tricky (but pretty simple) concurrency primitive code * ```Add KillHandle``` and ```Add kill::Death``` are the bulk of the logic. Task killing commits: * ```Implement KillHandle::kill() and friends```, ```Do a task-killed check```, and ```Add BlockedTask``` implement the killing logic; * ```Change the HOF context switchers``` turns said logic on Linked failure commits: * ```Replace *rust_task ptrs``` adapts the taskgroup code to work for both runtimes * ```Enable taskgroup code``` does what it says on the tin. r? @brson
~str and @str need separate implementations for use in generic functions, where it will not automatically use the impl on &str.
Contributor
Author
|
Hm this was messy, making a new PR |
flip1995
pushed a commit
to flip1995/rust
that referenced
this pull request
Nov 4, 2021
…Frednet Add suggestion to missing backticks error changelog: Add a machine applicable suggestion for the [`doc_markdown`] missing backticks lint closes: rust-lang#7737
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
fixes issue #7900