Commit d1fdfc8 1 parent 024631b commit d1fdfc8 Copy full SHA for d1fdfc8
File tree 5 files changed +18
-2
lines changed
5 files changed +18
-2
lines changed Original file line number Diff line number Diff line change 19
19
# The default target we're compiling on and for
20
20
TARGET : [x86_64-unknown-linux-gnu, thumbv6m-none-eabi, thumbv7m-none-eabi]
21
21
22
+ FEATURES : ["", "--features std"]
23
+
22
24
include :
23
25
# Test MSRV
24
26
- rust : 1.40.0
40
42
- uses : actions-rs/cargo@v1
41
43
with :
42
44
command : check
43
- args : --target=${{ matrix.TARGET }}
45
+ args : --target=${{ matrix.TARGET }} ${{ matrix.FEATURES }}
Original file line number Diff line number Diff line change 14
14
strategy :
15
15
matrix :
16
16
rust : [stable]
17
+ FEATURES : ["", "--features std"]
17
18
18
19
include :
19
20
- rust : 1.40.0
35
36
- uses : actions-rs/cargo@v1
36
37
with :
37
38
command : test
39
+ args : ${{ matrix.FEATURES }}
Original file line number Diff line number Diff line change @@ -21,3 +21,6 @@ nb = "1"
21
21
[dev-dependencies .stm32f1 ]
22
22
version = " 0.12"
23
23
features = [" stm32f103" , " rt" ]
24
+
25
+ [features ]
26
+ std = []
Original file line number Diff line number Diff line change @@ -58,6 +58,9 @@ pub mod i2c {
58
58
}
59
59
}
60
60
}
61
+
62
+ #[ cfg( feature = "std" ) ]
63
+ impl std:: error:: Error for ErrorKind { }
61
64
}
62
65
63
66
pub mod spi {
@@ -120,6 +123,9 @@ pub mod spi {
120
123
}
121
124
}
122
125
}
126
+
127
+ #[ cfg( feature = "std" ) ]
128
+ impl std:: error:: Error for ErrorKind { }
123
129
}
124
130
125
131
pub mod serial {
@@ -177,4 +183,7 @@ pub mod serial {
177
183
}
178
184
}
179
185
}
186
+
187
+ #[ cfg( feature = "std" ) ]
188
+ impl std:: error:: Error for ErrorKind { }
180
189
}
Original file line number Diff line number Diff line change 413
413
414
414
#![ doc( html_root_url = "https://docs.rs/embedded-hal/1.0.0-alpha.4" ) ]
415
415
#![ deny( missing_docs) ]
416
- #![ no_std]
416
+ #![ cfg_attr ( not ( feature = "std" ) , no_std) ]
417
417
418
418
pub mod blocking;
419
419
mod errors;
You can’t perform that action at this time.
0 commit comments