- 
                Notifications
    You must be signed in to change notification settings 
- Fork 13.9k
Remove duplicated fn(Box<[T]>) -> Vec<T> #84248
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
          
     Merged
      
      
    
                
     Merged
            
            
          Conversation
  
    
      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
    
  
  
    
    | r? @kennytm (rust-highfive has picked a reviewer for you, use r? to override) | 
| r? @Amanieu | 
              
                    Amanieu
  
              
              reviewed
              
                  
                    Apr 20, 2021 
                  
              
              
            
            
aa38c1a    to
    9db5466      
    Compare
  
    9db5466    to
    f505d61      
    Compare
  
    | @bors r+ rollup | 
| 📌 Commit f505d61 has been approved by  | 
    
  Dylan-DPC-zz 
      pushed a commit
        to Dylan-DPC-zz/rust
      that referenced
      this pull request
    
      Apr 22, 2021 
    
    
      
  
    
      
    
  
… r=Amanieu Remove duplicated fn(Box<[T]>) -> Vec<T> `<[T]>::into_vec()` does the same thing as `Vec::from::<Box<[T]>>()`, so they can be implemented in terms of each other. This was the previous implementation of `Vec::from()`, but was changed in rust-lang#78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.
    
  GuillaumeGomez 
      added a commit
        to GuillaumeGomez/rust
      that referenced
      this pull request
    
      Apr 23, 2021 
    
    
      
  
    
      
    
  
… r=Amanieu Remove duplicated fn(Box<[T]>) -> Vec<T> `<[T]>::into_vec()` does the same thing as `Vec::from::<Box<[T]>>()`, so they can be implemented in terms of each other. This was the previous implementation of `Vec::from()`, but was changed in rust-lang#78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.
    
  bors 
      added a commit
        to rust-lang-ci/rust
      that referenced
      this pull request
    
      Apr 23, 2021 
    
    
      
  
    
      
    
  
Rollup of 11 pull requests Successful merges: - rust-lang#80805 (Improve `Iterator::by_ref` example) - rust-lang#84248 (Remove duplicated fn(Box<[T]>) -> Vec<T>) - rust-lang#84321 (rustdoc: Convert sub-variant toggle to HTML) - rust-lang#84359 (:arrow_up: rust-analyzer) - rust-lang#84374 (Clean up .gitignore) - rust-lang#84387 (Move `sys_common::poison` to `sync::poison`) - rust-lang#84430 (doc/platform-support: clarify UEFI support) - rust-lang#84433 (Prevent control, shift and alt keys to make search input lose focus) - rust-lang#84444 (doc: Get rid of "[+] show undocumented items" toggle on numeric From impls) - rust-lang#84456 (Fix ICE if original_span(fn_sig) returns a span not in body sourcefile) - rust-lang#84469 (Update comment on `PrimTy::name_str`) Failed merges: r? `@ghost` `@rustbot` modify labels: rollup
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
      Labels
      
    S-waiting-on-bors
  Status: Waiting on bors to run and complete tests. Bors will change the label on completion. 
  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.
  
    
  
    
<[T]>::into_vec()does the same thing asVec::from::<Box<[T]>>(), so they can be implemented in terms of each other. This was the previous implementation ofVec::from(), but was changed in #78461. I'm not sure what the rationale was for that change, but it seems preferable to maintain a single implementation.