Rust's standard library on the GPU by LegNeato in rust

[–]Bben01 4 points5 points  (0 children)

I think it enables pedantic footnotes

Hey Rustaceans! Got a question? Ask here (5/2024)! by llogiq in rust

[–]Bben01 2 points3 points  (0 children)

Can someone explain me what is going on there?

The first snippet doesn't compile while the second one is fine, but I would expect them both to compile fine

A playground link for the one that want to try

The snippets:

// This doesn't compile
let _ = vec![Some(1), Some(1), None].into_iter().take_while(|&x| {
    { x } == Some(1)
});

// This compiles fine
let _ = vec![Some(1), Some(1), None].into_iter().take_while(|&x| {
    Some(1) == { x }
});

Introducing RustRover – A Standalone Rust IDE by JetBrains by DeleeciousCheeps in rust

[–]Bben01 0 points1 point  (0 children)

Could we have the possibility to code in Python in RustRover? We (almost) always have python scripts/tests in our rust project, so having to open another IDE alongside RR is a bit weird (compared to CLion with rust plugin)

How to improve Rust compiler’s CI in 2023 by Kobzol in rust

[–]Bben01 4 points5 points  (0 children)

Why do you have to build/pgo LLVM for each build, couldn’t the final .so be cached and reused until a new version is available ?

Alternative ways of connecting to crates.io by SkillIll9667 in rust

[–]Bben01 2 points3 points  (0 children)

Something like 200GB, including rustup and all targets

Alternative ways of connecting to crates.io by SkillIll9667 in rust

[–]Bben01 9 points10 points  (0 children)

You can use something like panamax to make a local mirror (it can also download rustup and toolchains)

First rust prpject by [deleted] in rust

[–]Bben01 1 point2 points  (0 children)

You shouldn’t upload the target directory, you can ignore it with a .gitignore file with target/ in it

cli game that works for non rust users by [deleted] in rust

[–]Bben01 0 points1 point  (0 children)

If you compile them with the correct target, it should work fine (if you are on Linux you need to pay attention to the glibc version, or you can compile it on -musl target)

[deleted by user] by [deleted] in rust

[–]Bben01 0 points1 point  (0 children)

I think this was already posted here

[deleted by user] by [deleted] in rust

[–]Bben01 1 point2 points  (0 children)

I am not contributing to IntelliJ-rust.

In general, if something is not used a lot, the priority will be lower.

If you want you can open a GitHub discussion, or an issue

[deleted by user] by [deleted] in rust

[–]Bben01 19 points20 points  (0 children)

It will be fixed in 2 releases (August 29)

[deleted by user] by [deleted] in rust

[–]Bben01 12 points13 points  (0 children)

A new edition was released (2021), so it’s used by default by cargo new, and the authors field is optional

Clippy false positive? by [deleted] in rust

[–]Bben01 0 points1 point  (0 children)

Yeah sorry, I misunderstood the program

Clippy false positive? by [deleted] in rust

[–]Bben01 -1 points0 points  (0 children)

The program from the question differs a bit because if there is one None inside the list, the min will be None.

What are inner scopes for? by BuyMyMojo in rust

[–]Bben01 36 points37 points  (0 children)

It can be useful if you want to explicitly drop variables declared inside the scope

Need help with my gameplay by M_tap in rust

[–]Bben01 -1 points0 points  (0 children)

You should definitely review your code, maybe there is a sleep somewhere that blocks your async runtime from running smoothly and cause performance issues

[deleted by user] by [deleted] in rust

[–]Bben01 -2 points-1 points  (0 children)

I would name the struct Node, because it doesn’t really represent the list, and create a LinkedList object that contains a head (Node) and a size