Tweak some stabilizations in libstd
This commit tweaks a few stable APIs in the `beta` branch before they hit stable. The `str::is_whitespace` and `str::is_alphanumeric` functions were deleted (added in #49381, issue at #49657). The `and_modify` APIs added in #44734 were altered to take a `FnOnce` closure rather than a `FnMut` closure. Closes #49581 Closes #49657
This commit is contained in:
parent
65d201f7d6
commit
ca79ba300a
4 changed files with 5 additions and 47 deletions
|
@ -437,7 +437,7 @@ fn partition_source(s: &str) -> (String, String) {
|
|||
|
||||
for line in s.lines() {
|
||||
let trimline = line.trim();
|
||||
let header = trimline.is_whitespace() ||
|
||||
let header = trimline.chars().all(|c| c.is_whitespace()) ||
|
||||
trimline.starts_with("#![") ||
|
||||
trimline.starts_with("#[macro_use] extern crate") ||
|
||||
trimline.starts_with("extern crate");
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue