Skip to content

Conversation

jplatte
Copy link
Member

@jplatte jplatte commented Jun 22, 2025

… and update imports accordingly.

Motivation

Makes the code less weird, and makes std dependencies clearer by not using the prelude anymore.

Solution

See individual commits.

@hds if you like this, I can convert the remaining crates that currently have #![cfg_attr(not(feature = "std"), no_std)] to this style in follow-up PRs.

@jplatte jplatte requested review from hawkw and a team as code owners June 22, 2025 19:04
@jplatte jplatte force-pushed the jplatte/core-no-std branch from 364cacb to b6e7321 Compare June 22, 2025 20:40
Copy link
Contributor

@djc djc left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like it!

In other crates, we've set up #![warn(clippy::alloc_instead_of_core, clippy::std_instead_of_core)] which might provide a better development experience?

Sorry for the slow feedback -- mentioning me on GitHub might work better than Discord.

@jplatte
Copy link
Member Author

jplatte commented Sep 5, 2025

Sorry for the slow feedback -- mentioning me on GitHub might work better than Discord.

No worries, this is still plenty fast in terms of feedback on tracing PRs 🫠

@djc
Copy link
Contributor

djc commented Sep 5, 2025

Do you have privileges in this repo? If not, I guess I can just merge it.

… except std::sync::Mutex, which there is a polyfill for.
@jplatte jplatte force-pushed the jplatte/core-no-std branch from b6e7321 to f42f840 Compare September 5, 2025 09:05
@jplatte jplatte enabled auto-merge (rebase) September 5, 2025 09:06
@jplatte jplatte merged commit fad6de7 into main Sep 5, 2025
55 of 56 checks passed
@jplatte jplatte deleted the jplatte/core-no-std branch September 5, 2025 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants