Skip to content

Commit 7d85648

Browse files
cjlongoriafacebook-github-bot
authored andcommitted
Remove let_chain feature and update logic
Summary: The unstable let_chains feature was removed in 1.90.0 for editions below 2024. While this buck target is edition 2024, the `try_stream!` macro is passing a let_chain over to the [async_stream crate](https://www.internalfb.com/code/fbsource/[17267cc0a688cd26890a0f4ad1940ebc87047a3c]/third-party/rust/vendor/async-stream-0.3.5/src/lib.rs?lines=227) which [isn't 2024 edition.](https://www.internalfb.com/code/fbsource/[17267cc0a688cd26890a0f4ad1940ebc87047a3c]/third-party/rust/vendor/async-stream-0.3.5/Cargo.toml?lines=13) rust-lang/rust#143214 rust-lang/rust#145878 Reviewed By: diliop Differential Revision: D83312115 fbshipit-source-id: 64d31b4f400e0546d9985b78c6c3fade5598d28c
1 parent be315ae commit 7d85648

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

eden/mononoke/mercurial/bundles/src/lib.rs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
* GNU General Public License version 2.
66
*/
77

8-
#![feature(let_chains)]
98
use mononoke_macros::mononoke;
109
pub mod bundle2;
1110
pub mod bundle2_encode;

eden/mononoke/mercurial/bundles/src/utils.rs

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,8 +159,13 @@ where
159159
yield frame;
160160
}
161161
}
162-
while !buf.is_empty() && let Some(frame) = decoder.decode_eof(&mut buf)? {
163-
yield frame;
162+
while !buf.is_empty()
163+
{
164+
if let Some(frame) = decoder.decode_eof(&mut buf)? {
165+
yield frame;
166+
} else {
167+
break
168+
}
164169
}
165170
}
166171
}

0 commit comments

Comments
 (0)