Skip to content
This repository was archived by the owner on Oct 23, 2022. It is now read-only.

Commit 47d2674

Browse files
bors[bot]Joonas Koivunen
and
Joonas Koivunen
authored
Merge #288
288: fix: update async-stream to 0.3 r=ljedrz a=koivunej this uses the rust 1.45 features to remove recursion inside the macro. great for #284 which adds even more complicated async-stream(s). good to go if CI passes. Co-authored-by: Joonas Koivunen <[email protected]>
2 parents 9099945 + 5b6b5dd commit 47d2674

File tree

7 files changed

+11
-16
lines changed

7 files changed

+11
-16
lines changed

Cargo.lock

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

Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ nightly = []
1212
[dependencies]
1313
anyhow = { default-features = false, version = "1.0" }
1414
async-std = { default-features = false, features = ["attributes", "std"], version = "1.6" }
15-
async-stream = { default-features = false, version = "0.2" }
15+
async-stream = { default-features = false, version = "0.3" }
1616
async-trait = { default-features = false, version = "0.1" }
1717
bitswap = { path = "bitswap" }
1818
byteorder = { default-features = false, version = "1.3" }

http/Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ prost-build = { default-features = false, version = "0.6" }
1010
vergen = { default-features = false, version = "3.1" }
1111

1212
[dependencies]
13-
async-stream = { default-features = false, version = "0.2" }
13+
async-stream = { default-features = false, version = "0.3" }
1414
bytes = { default-features = false, version = "0.5" }
1515
cid = { default-features = false, version = "0.5" }
1616
futures = { default-features = false, version = "0.3" }
@@ -33,7 +33,7 @@ tar = { default-features = false, version = "0.4" }
3333
thiserror = { default-features = false, version = "1.0" }
3434
tokio = { default-features = false, features = ["full"], version = "0.2" }
3535
tracing = { default-features = false, features = ["log"], version = "0.1" }
36-
tracing-subscriber = { default-features = false, features = ["fmt", "tracing-log"], version = "0.2" }
36+
tracing-subscriber = { default-features = false, features = ["fmt", "tracing-log", "env-filter"], version = "0.2" }
3737
url = { default-features = false, version = "2.1" }
3838
warp = { default-features = false, version = "0.2" }
3939

http/src/lib.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
1-
// Required by the use of async_stream
2-
#![recursion_limit = "512"]
3-
41
#[macro_use]
52
extern crate tracing;
63

http/src/v0/refs.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -472,7 +472,7 @@ fn iplds_refs<T: IpfsTypes>(
472472
}
473473
};
474474

475-
let mut ipld = match decode_ipld(&cid, &data) {
475+
let ipld = match decode_ipld(&cid, &data) {
476476
Ok(ipld) => ipld,
477477
Err(e) => {
478478
warn!("failed to parse {}, linked from {}: {}", cid, source, e);

http/src/v0/root_files.rs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ fn walk<Types: IpfsTypes>(
161161
ContinuedWalk::File(segment, item) => {
162162
if let Entry::Metadata(MetadataEntry::File(.., p, md, size)) = item.as_entry() {
163163
if segment.is_first() {
164-
for mut bytes in tar_helper.apply_file(p, md, size)?.iter_mut() {
164+
for bytes in tar_helper.apply_file(p, md, size)?.iter_mut() {
165165
if let Some(bytes) = bytes.take() {
166166
yield bytes;
167167
}
@@ -194,7 +194,7 @@ fn walk<Types: IpfsTypes>(
194194
if let Entry::Metadata(metadata_entry) = item.as_entry() {
195195
let metadata = metadata_entry.metadata();
196196
let path = metadata_entry.path();
197-
for mut bytes in tar_helper.apply_directory(path, metadata)?.iter_mut() {
197+
for bytes in tar_helper.apply_directory(path, metadata)?.iter_mut() {
198198
if let Some(bytes) = bytes.take() {
199199
yield bytes;
200200
}
@@ -210,7 +210,7 @@ fn walk<Types: IpfsTypes>(
210210
let target = Path::new(target);
211211
let metadata = metadata_entry.metadata();
212212

213-
for mut bytes in tar_helper.apply_symlink(path, target, metadata)?.iter_mut() {
213+
for bytes in tar_helper.apply_symlink(path, target, metadata)?.iter_mut() {
214214
if let Some(bytes) = bytes.take() {
215215
yield bytes;
216216
}

src/lib.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
//! IPFS node implementation
22
//#![deny(missing_docs)]
3-
// Recursion limit is required by the use of async_stream
4-
#![recursion_limit = "512"]
53
#![cfg_attr(feature = "nightly", feature(external_doc))]
64
#![cfg_attr(feature = "nightly", doc(include = "../README.md"))]
75

0 commit comments

Comments
 (0)