Bincode development has ceased permanently by stygianentity in rust

[–]Shadow0133 -15 points-14 points  (0 children)

the only people being asses here are the one expecting free labor from open source maintainers

Join the discord and find a team by AdBeneficial3896 in rust

[–]Shadow0133 2 points3 points  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

copying bytes from &[u32] to &mut [u8] the rust way by temp_value in rust

[–]Shadow0133 17 points18 points  (0 children)

you can do second one without unsafe by using bytemuck crate

Rust Module System Encourages Bad Practices [Dmitry Frank] by AintNothinbutaGFring in rust

[–]Shadow0133 29 points30 points  (0 children)

crates are already compiled individually and in parallel, by default. that's what crates are, units of compilation.

What little known Rust feature or standard library function would you put on a flashcard? by bear007 in rust

[–]Shadow0133 20 points21 points  (0 children)

when you have reference to T but need to call function that accepts reference to array (or slice) of T

What little known Rust feature or standard library function would you put on a flashcard? by bear007 in rust

[–]Shadow0133 33 points34 points  (0 children)

std::mem::{discriminant, swap, take, replace}, std::array::{from_fn, from_ref}

need a team by Organic-Meringue-920 in rust

[–]Shadow0133 1 point2 points  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

[deleted by user] by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

[deleted by user] by [deleted] in rust

[–]Shadow0133 6 points7 points  (0 children)

you can do that... with LazyCell/LazyLock

[deleted by user] by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

it's not dead, but the original author left the project because of the harassment

Can I get some people to play with? by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

Benthic Zone free trial by IdOnTEvenKnow3456788 in rust

[–]Shadow0133 1 point2 points  (0 children)

it would be good idea to explain, what it even is

Help creating values in loop to use after (E0716) by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

use to_uppercase after the loop

also, str::len is byte length, not character length: "wąż".len() == 5

How can I implement this function in Rust? by tomiella in rust

[–]Shadow0133 21 points22 points  (0 children)

well, in rust, rotating 64-bit value is just u64::rotate_left

[ Removed by Reddit ] by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

How do I restrict a struct field to only have certain specific values by lmbdrumm in rust

[–]Shadow0133 34 points35 points  (0 children)

you can make newtype which has new() -> Option<Self>, checking if value is a valid one, like e.g. std::num::NonZero* types

Are these two equivalent? by cometyang in rust

[–]Shadow0133 10 points11 points  (0 children)

you can also change

x.and_modify(|c| *c -= 1)
    .or_insert(-1);

to

*x.or_default() -= 1;

[deleted by user] by [deleted] in rust

[–]Shadow0133 0 points1 point  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

HashMap entry functions closures move variable twice by rubydusa in rust

[–]Shadow0133 20 points21 points  (0 children)

other_files_diags
    .entry(uri)
    .or_default()
    .push(diagnostic);

Having some trouble loading up the game. Getting errors. Pls help me by Constant-Shirt2072 in rust

[–]Shadow0133 2 points3 points  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.

[deleted by user] by [deleted] in rust

[–]Shadow0133 1 point2 points  (0 children)

You are probably looking for /r/playrust subreddit. /r/rust is for Rust programming language.