Skip to content

Commit 6e186cc

Browse files
committed
fix: std features were enabled by default
Signed-off-by: Lachezar Lechev <elpiel93@gmail.com>
1 parent 61cf9a9 commit 6e186cc

File tree

3 files changed

+22
-16
lines changed

3 files changed

+22
-16
lines changed

Cargo.lock

Lines changed: 11 additions & 12 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,13 +28,20 @@ repository = "https://github.com/AeroRust/free-flight-stabilization"
2828

2929
rust-version = "1.71"
3030

31+
[features]
32+
default = []
33+
std = ["num-traits/std", "piddiy/std", "fixed/std"]
34+
3135
[dependencies]
32-
num-traits = "0.2.18"
36+
num-traits = { version = "0.2", default-features = false }
3337
piddiy = "0.1.1"
3438

3539
[dev-dependencies]
36-
fixed = { version = "1.27.0", features = ["num-traits"] }
37-
libc = "0.2.154"
40+
fixed = { version = "1.28", features = ["num-traits"] }
41+
libc = { version = "0.2", default-features = false }
42+
43+
[patch.crates-io]
44+
piddiy = { version = "0.1.1", git = "https://github.com/LechevSpace/piddiy", branch = "fix/no_std-num-trait-for-float-numbers" }
3845

3946
[package.metadata.docs.rs]
4047
all-features = true

src/lib.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
//! version 1.3, an Arduino-based flight controller software. These functions
88
//! are used to stabilize unmanned aerial vehicles (UAVs).
99
10-
#![no_std]
10+
#![cfg_attr(not(feature = "std"), no_std)]
1111
#![deny(missing_docs)]
1212
#![deny(rustdoc::broken_intra_doc_links)]
1313
#![cfg_attr(docsrs, feature(doc_cfg))]

0 commit comments

Comments
 (0)