Skip to content

Conversation

TennyZhuang
Copy link
Contributor

Implement #114135

The API is consistent with other collections.

@rustbot
Copy link
Collaborator

rustbot commented Jul 27, 2023

r? @thomcc

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jul 27, 2023
@thomcc
Copy link
Member

thomcc commented Jul 27, 2023

@thomcc thomcc added the S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. label Jul 27, 2023
@TennyZhuang
Copy link
Contributor Author

@TennyZhuang
Copy link
Contributor Author

rust-lang/libs-team#250

@Dylan-DPC Dylan-DPC removed the S-waiting-on-ACP Status: PR has an ACP and is waiting for the ACP to complete. label Nov 4, 2023
@thomcc
Copy link
Member

thomcc commented Nov 24, 2023

This has ACP+, and the implementation looks fine.

@bors r+

@bors
Copy link
Collaborator

bors commented Nov 24, 2023

📌 Commit 5df60f4 has been approved by thomcc

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 24, 2023
@bors
Copy link
Collaborator

bors commented Nov 24, 2023

⌛ Testing commit 5df60f4 with merge f665b31...

bors added a commit to rust-lang-ci/rust that referenced this pull request Nov 24, 2023
…omcc

add LinkedList::{retain,retain_mut}

Implement rust-lang#114135

The API is consistent with other collections.
@rust-log-analyzer
Copy link
Collaborator

The job aarch64-gnu failed! Check out the build log: (web) (plain)

Click to see the possible cause of the failure (guessed by this bot)
[RUSTC-TIMING] rustc_hir_analysis test:false 132.715
[RUSTC-TIMING] rustc_mir_build test:false 131.260
[RUSTC-TIMING] rustc_lint test:false 87.084
[RUSTC-TIMING] rustc_ty_utils test:false 43.730
##[error]The runner has received a shutdown signal. This can happen when the runner service is stopped, or a manually started runner is canceled.
##[group]Clock drift check
##[group]Clock drift check
Session terminated, killing shell... ...killed.
  network time: 
##[error]The operation was canceled.
Cleaning up orphan processes

@bors
Copy link
Collaborator

bors commented Nov 25, 2023

💔 Test failed - checks-actions

@bors bors added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. and removed S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. labels Nov 25, 2023
@thomcc
Copy link
Member

thomcc commented Nov 25, 2023

@rustbot author

@rustbot rustbot added S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Nov 25, 2023
GuillaumeGomez added a commit to GuillaumeGomez/rust that referenced this pull request Dec 8, 2023
…thomcc

add LinkedList::{retain,retain_mut}

Implement rust-lang#114135

The API is consistent with other collections.
@bors
Copy link
Collaborator

bors commented Dec 9, 2023

⌛ Testing commit 5df60f4 with merge 1a3aa4a...

@bors
Copy link
Collaborator

bors commented Dec 9, 2023

☀️ Test successful - checks-actions
Approved by: thomcc
Pushing 1a3aa4a to master...

@bors bors added the merged-by-bors This PR was explicitly merged by bors. label Dec 9, 2023
@bors bors merged commit 1a3aa4a into rust-lang:master Dec 9, 2023
@rustbot rustbot added this to the 1.76.0 milestone Dec 9, 2023
@rust-timer
Copy link
Collaborator

Finished benchmarking commit (1a3aa4a): comparison URL.

Overall result: no relevant changes - no action needed

@rustbot label: -perf-regression

Instruction count

This benchmark run did not return any relevant results for this metric.

Max RSS (memory usage)

Results

This is a less reliable metric that may be of interest but was not used to determine the overall result at the top of this comment.

mean range count
Regressions ❌
(primary)
1.6% [0.6%, 2.7%] 2
Regressions ❌
(secondary)
2.7% [2.5%, 2.9%] 2
Improvements ✅
(primary)
-2.1% [-2.6%, -1.5%] 2
Improvements ✅
(secondary)
- - 0
All ❌✅ (primary) -0.2% [-2.6%, 2.7%] 4

Cycles

This benchmark run did not return any relevant results for this metric.

Binary size

This benchmark run did not return any relevant results for this metric.

Bootstrap: 669.092s -> 668.465s (-0.09%)
Artifact size: 314.12 MiB -> 314.06 MiB (-0.02%)

@jdahlstrom
Copy link

Wasn't this supposed to only have the single retain method, as per the ACP?

jhpratt added a commit to jhpratt/rust that referenced this pull request Jul 7, 2025
Renamed retain_mut to retain on LinkedList as mentioned in the ACP

This is for proposal: rust-lang/libs-team#250

The original check-in (rust-lang#114136) contained both methods **retain** and **retain_mut**, which does not conform to rust-lang/libs-team#250 (comment).

I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request.

The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements.

I've run the tests "library/alloc" on the code and no issues.

Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
rust-timer added a commit that referenced this pull request Jul 7, 2025
Rollup merge of #143529 - pixel27:master, r=jhpratt

Renamed retain_mut to retain on LinkedList as mentioned in the ACP

This is for proposal: rust-lang/libs-team#250

The original check-in (#114136) contained both methods **retain** and **retain_mut**, which does not conform to rust-lang/libs-team#250 (comment).

I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request.

The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements.

I've run the tests "library/alloc" on the code and no issues.

Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
github-actions bot pushed a commit to model-checking/verify-rust-std that referenced this pull request Jul 11, 2025
Renamed retain_mut to retain on LinkedList as mentioned in the ACP

This is for proposal: rust-lang/libs-team#250

The original check-in (rust-lang#114136) contained both methods **retain** and **retain_mut**, which does not conform to rust-lang/libs-team#250 (comment).

I updated the retain documentation to specify **&mut e**, removed the **retain** method and renamed **retain_mut** to **retain** to conform to the request.

The pull request doesn't really contain much that is new, just removes the unwanted method to meet the requirements.

I've run the tests "library/alloc" on the code and no issues.

Hopefully I'm not stepping on the original author's toes. I just ran across a need for the method and wondered why it was unstable.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged-by-bors This PR was explicitly merged by bors. S-waiting-on-author Status: This is awaiting some action (such as code changes or more information) from the author. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants