Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

nostd: remove left-overs fromno_std feature flag#36

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
Manishearth merged 4 commits intounicode-rs:masterfromdvdhrm:pr/nostd
Apr 11, 2024

Conversation

@dvdhrm
Copy link
Contributor

Theno_std feature flag has been reworked in the past and is now basically the default. This PR removes some leftovers, fixes several warnings about redundant use-declarations, and updates the documentation.

None of this is critical, so feel free to cherry-pick individual pieces, or let me know how to rework them.

Note that I did not see anyrust-version or MSVR annotations, so I could not test this with the base version. But I do not think the preludes changed much, so this should be fine.

unicode-width no longer depends on `std`. This has been updated inREADME.md in96eaa4a, but the introductory comments in `lib.rs` stillshow the old information.Align `lib.rs` with `README.md` and drop reference to the old `no_std`feature flag.
@Manishearth
Copy link
Member

The regen script also needs to be updated

The package is always compiled as `no_std` and pulls in `std`  and`test` when compiling tests. Hence:- The prelude of `core` is available unconditionally, and it includes  `core::options::Option` and its variants. No need to manually declare  them.- The `test` crate is in-scope automatically, so no need to manually  declare it.
The `std` crate is unconditionally pulled in for test builds, hence wecan rely on it. Drop the redundant guards that check against `no_std`.
The `no_std` feature flag has no effect, anymore (as already documentedin `README.md`). Document this in `Cargo.toml`, but retain it forbackwards compatibility.Note that for better cross-package composability, an `std` flag wouldlikely be preferred in the future, over a `no_std` flag. The formerallows multiple packages with different preferences on this feature tobe combined in a single build, while the latter does not.Hence, suggest that `no_std` as feature flag is a legacy compatibilityflag, and will not be used in the future.
@dvdhrm
Copy link
ContributorAuthor

Argh! Sorry, missed the script. Now fixed!

Would you mind if I change the script to write tosrc/generated.rs and thenpub use ... it fromsrc/tables.rs? It would avoid placing non-generated content into the script. Not that I care too much, so feel free to reject it.

@Manishearth
Copy link
Member

shrug I don't consider that too important

dvdhrm reacted with thumbs up emoji

@ManishearthManishearth merged commit7c489c3 intounicode-rs:masterApr 11, 2024
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@ManishearthManishearthManishearth approved these changes

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@dvdhrm@Manishearth

[8]ページ先頭

©2009-2025 Movatter.jp