Skip to content
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

Add permute to standard library #1013

Closed
jdm opened this issue Oct 8, 2011 · 2 comments
Closed

Add permute to standard library #1013

jdm opened this issue Oct 8, 2011 · 2 comments
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.

Comments

@jdm
Copy link
Contributor

jdm commented Oct 8, 2011

It's too much effort to create a branch and pull request at this point, so I'll paste the code I've been using inline:

iter permute(elts: [@T]) -> [@T] {
    if vec::is_not_empty(elts) {
        for each i in uint::range(0u, vec::len(elts)) {
            let rest = vec::slice(elts, 0u, i);
            rest += vec::slice(elts, i + 1u, vec::len(elts));
            for each permutation in permute(tmp) {
                put [elts[i]] + permutation;
            }
        }        
    } else {
        put [];
    }
}
@mbrubeck
Copy link
Contributor

mbrubeck commented Nov 3, 2011

This issue can be closed; it is fixed by #1121.

@jdm
Copy link
Contributor Author

jdm commented Nov 3, 2011

.

@jdm jdm closed this as completed Nov 3, 2011
arielb1 pushed a commit to arielb1/rust that referenced this issue Apr 10, 2015
Replace duplicate() by try_clone() in std::net.
flip1995 pushed a commit to flip1995/rust that referenced this issue Dec 17, 2021
…type_complexity, r=llogiq

Ignore associated types in traits when considering type complexity

changelog: Ignore associated types in traits when checking ``[`type_complexity`]`` lint.

fixes rust-lang#1013
ZuseZ4 pushed a commit to EnzymeAD/rust that referenced this issue Mar 7, 2023
coastalwhite pushed a commit to coastalwhite/rust that referenced this issue Aug 5, 2023
I plan to deprecate `doc(include)` in the near future, and
rust-lang/rust denies warnings in CI.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
E-easy Call for participation: Easy difficulty. Experience needed to fix: Not much. Good first issue.
Projects
None yet
Development

No branches or pull requests

2 participants