File tree Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Expand file tree Collapse file tree 6 files changed +20
-4
lines changed Original file line number Diff line number Diff line change 73
73
command : install
74
74
args : cargo-hack
75
75
76
+ - name : Generate Cargo.lock
77
+ uses : actions-rs/cargo@v1
78
+ with : { command: generate-lockfile }
79
+
80
+ - name : Tweak lockfile
81
+ run : |
82
+ cargo update -p=native-tls --precise=0.2.8
83
+
76
84
- name : check lib
77
85
if : >
78
86
matrix.target.os != 'ubuntu-latest'
@@ -142,10 +150,9 @@ jobs:
142
150
with : { command: generate-lockfile }
143
151
144
152
- name : Tweak lockfile
145
- uses : actions-rs/cargo@v1
146
- with :
147
- command : update
148
- args : -p=rustls --precise=0.20.2
153
+ run : |
154
+ cargo update -p=rustls --precise=0.20.2
155
+ cargo update -p=native-tls --precise=0.2.8
149
156
150
157
- name : tests
151
158
run : |
Original file line number Diff line number Diff line change 1
1
# Changes
2
2
3
3
## Unreleased - 2022-xx-xx
4
+ - Add ` #[track_caller] ` attribute to ` spawn ` functions and methods. [ #454 ]
5
+
6
+ [ #454 ] : https://github.com/actix/actix-net/pull/454
4
7
5
8
6
9
## 2.7.0 - 2022-03-08
Original file line number Diff line number Diff line change @@ -260,6 +260,7 @@ impl Arbiter {
260
260
/// If you require a result, include a response channel in the future.
261
261
///
262
262
/// Returns true if future was sent successfully and false if the Arbiter has died.
263
+ #[ track_caller]
263
264
pub fn spawn < Fut > ( & self , future : Fut ) -> bool
264
265
where
265
266
Fut : Future < Output = ( ) > + Send + ' static ,
@@ -275,6 +276,7 @@ impl Arbiter {
275
276
/// channel in the function.
276
277
///
277
278
/// Returns true if function was sent successfully and false if the Arbiter has died.
279
+ #[ track_caller]
278
280
pub fn spawn_fn < F > ( & self , f : F ) -> bool
279
281
where
280
282
F : FnOnce ( ) + Send + ' static ,
Original file line number Diff line number Diff line change @@ -195,6 +195,7 @@ pub mod task {
195
195
/// assert!(handle.await.unwrap_err().is_cancelled());
196
196
/// # });
197
197
/// ```
198
+ #[ track_caller]
198
199
#[ inline]
199
200
pub fn spawn < Fut > ( f : Fut ) -> JoinHandle < Fut :: Output >
200
201
where
Original file line number Diff line number Diff line change @@ -53,6 +53,7 @@ impl Runtime {
53
53
/// # Panics
54
54
/// This function panics if the spawn fails. Failure occurs if the executor is currently at
55
55
/// capacity and is unable to spawn a new future.
56
+ #[ track_caller]
56
57
pub fn spawn < F > ( & self , future : F ) -> JoinHandle < F :: Output >
57
58
where
58
59
F : Future + ' static ,
@@ -73,6 +74,7 @@ impl Runtime {
73
74
///
74
75
/// The caller is responsible for ensuring that other spawned futures complete execution by
75
76
/// calling `block_on` or `run`.
77
+ #[ track_caller]
76
78
pub fn block_on < F > ( & self , f : F ) -> F :: Output
77
79
where
78
80
F : Future ,
Original file line number Diff line number Diff line change @@ -204,6 +204,7 @@ impl SystemRunner {
204
204
}
205
205
206
206
/// Runs the provided future, blocking the current thread until the future completes.
207
+ #[ track_caller]
207
208
#[ inline]
208
209
pub fn block_on < F : Future > ( & self , fut : F ) -> F :: Output {
209
210
self . rt . block_on ( fut)
You can’t perform that action at this time.
0 commit comments