Skip to content

Commit acd2a5b

Browse files
Be more no_std
Instead of having `std` in scope and on by default, be `no_std` by default and use `std` more explicitly.
1 parent 12a9843 commit acd2a5b

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/lib.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ Since it's very simple we will start with limitations:
3939
#![cfg_attr(target_pointer_width = "64", warn(clippy::trivially_copy_pass_by_ref))]
4040
// END LINEBENDER LINT SET
4141
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
42-
#![cfg_attr(all(not(feature = "std"), not(test)), no_std)]
42+
#![no_std]
4343
// The following lints are part of the Linebender standard set,
4444
// but resolving them has been deferred for now.
4545
// Feel free to send a PR that solves one or more of these.
@@ -55,6 +55,8 @@ Since it's very simple we will start with limitations:
5555
#![cfg_attr(test, allow(unused_crate_dependencies))] // Some dev dependencies are only used in tests
5656

5757
extern crate alloc;
58+
#[cfg(feature = "std")]
59+
extern crate std;
5860

5961
use alloc::vec::Vec;
6062
use core::fmt;

0 commit comments

Comments
 (0)