Skip to content

Commit af34861

Browse files
authored
Merge branch 'tokio-rs:master' into master
2 parents dd08212 + 14c17fc commit af34861

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+1906
-1351
lines changed

.github/workflows/ci.yml

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ concurrency:
1313
env:
1414
RUSTFLAGS: -Dwarnings
1515
RUST_BACKTRACE: 1
16+
RUSTUP_WINDOWS_PATH_ADD_BIN: 1
1617
# Change to specific Rust release to pin
1718
rust_stable: stable
1819
rust_nightly: nightly-2024-05-05

Cargo.toml

-1
Original file line numberDiff line numberDiff line change
@@ -17,4 +17,3 @@ members = [
1717

1818
[workspace.metadata.spellcheck]
1919
config = "spellcheck.toml"
20-

LICENSE

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
Copyright (c) 2023 Tokio Contributors
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any
4-
person obtaining a copy of this software and associated
5-
documentation files (the "Software"), to deal in the
6-
Software without restriction, including without
7-
limitation the rights to use, copy, modify, merge,
8-
publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software
10-
is furnished to do so, subject to the following
11-
conditions:
3+
Copyright (c) Tokio Contributors
124

13-
The above copyright notice and this permission notice
14-
shall be included in all copies or substantial portions
15-
of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1611

17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21-
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24-
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25-
DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ Make sure you activated the full features of the tokio crate on Cargo.toml:
5656

5757
```toml
5858
[dependencies]
59-
tokio = { version = "1.37.0", features = ["full"] }
59+
tokio = { version = "1.38.0", features = ["full"] }
6060
```
6161
Then, on your main.rs:
6262

benches/time_timeout.rs

+2-2
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ fn do_timeout_test(c: &mut Criterion, workers: usize, name: &str) {
4040
b.iter_custom(|iters| {
4141
let start = Instant::now();
4242
runtime.block_on(async {
43-
black_box(spawn_timeout_job(iters as usize, workers).await);
43+
black_box(spawn_timeout_job(iters as usize, workers)).await;
4444
});
4545
start.elapsed()
4646
})
@@ -77,7 +77,7 @@ fn do_sleep_test(c: &mut Criterion, workers: usize, name: &str) {
7777
b.iter_custom(|iters| {
7878
let start = Instant::now();
7979
runtime.block_on(async {
80-
black_box(spawn_sleep_job(iters as usize, workers).await);
80+
black_box(spawn_sleep_job(iters as usize, workers)).await;
8181
});
8282
start.elapsed()
8383
})

spellcheck.dic

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
284
1+
285
22
&
33
+
44
<
@@ -34,6 +34,7 @@ amongst
3434
api
3535
APIs
3636
async
37+
atomics
3738
awaitable
3839
backend
3940
backpressure

tokio-macros/CHANGELOG.md

+6
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,9 @@
1+
# 2.3.0 (May 30th, 2024)
2+
3+
- macros: make `#[tokio::test]` append `#[test]` at the end of the attribute list ([#6497])
4+
5+
[#6497]: https://github.com/tokio-rs/tokio/pull/6497
6+
17
# 2.2.0 (November 19th, 2023)
28

39
### Changed

tokio-macros/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ name = "tokio-macros"
44
# - Remove path dependencies
55
# - Update CHANGELOG.md.
66
# - Create "tokio-macros-1.x.y" git tag.
7-
version = "2.2.0"
7+
version = "2.3.0"
88
edition = "2021"
99
rust-version = "1.63"
1010
authors = ["Tokio Contributors <team@tokio.rs>"]

tokio-macros/LICENSE

+2-27
Original file line numberDiff line numberDiff line change
@@ -1,32 +1,7 @@
1-
Copyright (c) 2023 Tokio Contributors
2-
3-
Permission is hereby granted, free of charge, to any
4-
person obtaining a copy of this software and associated
5-
documentation files (the "Software"), to deal in the
6-
Software without restriction, including without
7-
limitation the rights to use, copy, modify, merge,
8-
publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software
10-
is furnished to do so, subject to the following
11-
conditions:
12-
13-
The above copyright notice and this permission notice
14-
shall be included in all copies or substantial portions
15-
of the Software.
16-
17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21-
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24-
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25-
DEALINGS IN THE SOFTWARE.
26-
27-
The MIT License (MIT)
1+
MIT License
282

293
Copyright (c) 2019 Yoshua Wuyts
4+
Copyright (c) Tokio Contributors
305

316
Permission is hereby granted, free of charge, to any person obtaining a copy
327
of this software and associated documentation files (the "Software"), to deal

tokio-stream/LICENSE

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
Copyright (c) 2023 Tokio Contributors
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any
4-
person obtaining a copy of this software and associated
5-
documentation files (the "Software"), to deal in the
6-
Software without restriction, including without
7-
limitation the rights to use, copy, modify, merge,
8-
publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software
10-
is furnished to do so, subject to the following
11-
conditions:
3+
Copyright (c) Tokio Contributors
124

13-
The above copyright notice and this permission notice
14-
shall be included in all copies or substantial portions
15-
of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1611

17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21-
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24-
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25-
DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

tokio-stream/src/wrappers/interval.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ impl Stream for IntervalStream {
3333
}
3434

3535
fn size_hint(&self) -> (usize, Option<usize>) {
36-
(std::usize::MAX, None)
36+
(usize::MAX, None)
3737
}
3838
}
3939

tokio-test/LICENSE

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
Copyright (c) 2023 Tokio Contributors
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any
4-
person obtaining a copy of this software and associated
5-
documentation files (the "Software"), to deal in the
6-
Software without restriction, including without
7-
limitation the rights to use, copy, modify, merge,
8-
publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software
10-
is furnished to do so, subject to the following
11-
conditions:
3+
Copyright (c) Tokio Contributors
124

13-
The above copyright notice and this permission notice
14-
shall be included in all copies or substantial portions
15-
of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1611

17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21-
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24-
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25-
DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

tokio-util/LICENSE

+18-22
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,21 @@
1-
Copyright (c) 2023 Tokio Contributors
1+
MIT License
22

3-
Permission is hereby granted, free of charge, to any
4-
person obtaining a copy of this software and associated
5-
documentation files (the "Software"), to deal in the
6-
Software without restriction, including without
7-
limitation the rights to use, copy, modify, merge,
8-
publish, distribute, sublicense, and/or sell copies of
9-
the Software, and to permit persons to whom the Software
10-
is furnished to do so, subject to the following
11-
conditions:
3+
Copyright (c) Tokio Contributors
124

13-
The above copyright notice and this permission notice
14-
shall be included in all copies or substantial portions
15-
of the Software.
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
1611

17-
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF
18-
ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED
19-
TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A
20-
PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT
21-
SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY
22-
CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23-
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR
24-
IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
25-
DEALINGS IN THE SOFTWARE.
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

tokio-util/src/codec/any_delimiter_codec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::codec::decoder::Decoder;
22
use crate::codec::encoder::Encoder;
33

44
use bytes::{Buf, BufMut, Bytes, BytesMut};
5-
use std::{cmp, fmt, io, str, usize};
5+
use std::{cmp, fmt, io, str};
66

77
const DEFAULT_SEEK_DELIMITERS: &[u8] = b",;\n\r";
88
const DEFAULT_SEQUENCE_WRITER: &[u8] = b",";

tokio-util/src/codec/lines_codec.rs

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ use crate::codec::decoder::Decoder;
22
use crate::codec::encoder::Encoder;
33

44
use bytes::{Buf, BufMut, BytesMut};
5-
use std::{cmp, fmt, io, str, usize};
5+
use std::{cmp, fmt, io, str};
66

77
/// A simple [`Decoder`] and [`Encoder`] implementation that splits up data into lines.
88
///

tokio-util/src/time/wheel/mod.rs

-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ pub(crate) use self::stack::Stack;
77

88
use std::borrow::Borrow;
99
use std::fmt::Debug;
10-
use std::usize;
1110

1211
/// Timing wheel implementation.
1312
///

0 commit comments

Comments
 (0)