-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
cargo +nightly build error as unsatisfied trait bounds #48
Comments
It was a rust issue. ref: rust-lang/rust#100806 (comment) The only way, aka workaround, as far as I kown, is that use Rust stable channel or use a third-part lib to fix this boundary issue: just like what I have did here: https://github.com/greenhat616/clash-verge/tree/main/backend/delay_timer
|
it looks like the issue has made it into rust stable -- rust-lang/rust#100806 (comment) I tried the same diff as you had in greenhat616/clash-verge@dc81e1c#diff-06f45ed9ebd95944143757cdbc32141be89dc35712bcb01cbf057085538917d4 and that would fix it, although it only works with Diff enclosed herediff --git a/Cargo.toml b/Cargo.toml
index 56d11f7..a2d32ac 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -42,6 +42,7 @@ log = "^0.4.14"
tracing = "0.1.29"
thiserror = "^1.0.24"
+str_splitter = "0.1.1"
tokio = { version = "^1.3.0", features = ["full"] }
diff --git a/src/utils/parse.rs b/src/utils/parse.rs
index 9de44d0..ae56dae 100644
--- a/src/utils/parse.rs
+++ b/src/utils/parse.rs
@@ -3,6 +3,8 @@
/// Collection of functions related to shell commands and processes.
pub mod shell_command {
+ use str_splitter::combinators::SplitExt;
+
use crate::prelude::*;
use anyhow::Error as AnyhowError;
@@ -368,7 +370,9 @@ pub mod shell_command {
return None;
};
- let mut sub_command_inner = command.trim().split_inclusive(angle_bracket).rev();
+ // TODO: waiting for rust team fix this issue since: https://github.com/rust-lang/rust/pull/100806
+ // let mut sub_command_inner = command.trim().split_inclusive(angle_bracket).rev();
+ let mut sub_command_inner = command.trim().splitter(angle_bracket).to_inclusive().to_reversed();
sub_command_inner
.next() |
Hi guys, the issue has been fixed in V0.11.5 |
Describe the bug
i can not run
cargo +nightly build
as unsatisfied trait bounds.To Reproduce
Steps to reproduce the behavior:
rustc version: rustc 1.76.0-nightly (a1a37735c 2023-11-23)
delay_timer commit 69a3867
then error will show like:
Expected behavior
compile ok
Screenshots
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: