-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use alloc::vec::Vec instead of Vec for no_std support #4378
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,7 +12,7 @@ | |
//! require. | ||
#![doc(html_root_url = "https://docs.rs/web-sys/0.3")] | ||
#![cfg_attr(not(feature = "std"), no_std)] | ||
#![no_std] | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This bit me while working on #![no_std]
#[cfg(feature = "std")]
extern crate std; You can have an There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Uh, that's pretty neat! |
||
#![allow(deprecated)] | ||
|
||
extern crate alloc; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It sounds like the
std
Vec
usage was on purpose, it was just an oversight 😅!Just for context: this is always a bug, because crate features have to be additive and they are not supposed to break compilation when you add a crate feature!