hachyderm.io is one of the many independent Mastodon servers you can use to participate in the fediverse.
Hachyderm is a safe space, LGBTQIA+ and BLM, primarily comprised of tech industry professionals world wide. Note that many non-user account types have restrictions - please see our About page.

Administered by:

Server stats:

9.9K
active users

🆕🦀 Yet another version of , Rust 1.67.0, has just been released!

This one is a relatively small release. So, short release thread:

🧵 1/6

A must_use attribute on async functions now does what you expect.

#[must_use]
async fn hey() -> Thing { … }

Now, #[must_use] applies to `Thing`, instead of to the `impl Future<Output=Thing>` (which wasn't very useful).

2/6

std::sync::mpsc has a new implementation, based on crossbeam-channel.

The old implementation had some issues and was hard to maintain. The new implementation fixes some small but long-standing bugs and has better performance.

(The public interface remains unchanged.)

3/6

The integer types now have (integer) logarithm methods: ilog, ilog10, ilog2. (And zero-checking versions: checked_ilog, checked_ilog10, and checked_ilog2.)

ilog2 is implemented using leading_zeros(), so is very efficient.

All of these methods usable in const context too.

4/6

Mara

Clippy has a number of exciting new lints: github.com/rust-lang/rust-clip

For example, you can now enable #![warn(clippy::manual_let_else)] to tell you about some situations where you could use the recently introduced let-else syntax.

5/6

@Mara the new uninlined_format_args lint is pretty awesome, too!

@Mara Oh neat. Reminds me I need to write a proposal for some language to consider adding "return if"

@Mara turning this on as soon as cargo fmt formats let-else properly.

@Mara TIL, nice! I've been using match blocks for early returns and clippy hasn't caught on yet 😅