Skip to content

Commit

Permalink
Merge pull request #294 from redbadger/viktor/clippy
Browse files Browse the repository at this point in the history
Fix clippy warnings
  • Loading branch information
charypar authored Jan 16, 2025
2 parents 67413eb + b0cf423 commit 5d9f7d4
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ edition = "2021"
repository = "https://github.com/redbadger/crux/"
license = "Apache-2.0"
keywords = ["crux", "crux_core", "cross-platform-ui", "ffi", "wasm"]
rust-version = "1.66"
rust-version = "1.80"

[workspace.dependencies]
anyhow = "1.0.91"
Expand Down
2 changes: 1 addition & 1 deletion crux_core/src/capability/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ pub struct Drain<'a, T> {
receiver: &'a Receiver<T>,
}

impl<'a, T> Iterator for Drain<'a, T> {
impl<T> Iterator for Drain<'_, T> {
type Item = T;

fn next(&mut self) -> Option<Self::Item> {
Expand Down
5 changes: 3 additions & 2 deletions crux_core/src/capability/executor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -247,12 +247,13 @@ mod tests {
}
if rand::thread_rng().gen_bool(0.1) {
cx.waker().wake_by_ref();
return Poll::Pending;

Poll::Pending
} else {
let mut ready = true;
let this = self.get_mut();
for child in &mut this.children {
if let Poll::Pending = child.poll_unpin(cx) {
if child.poll_unpin(cx).is_pending() {
ready = false;
}
}
Expand Down
4 changes: 2 additions & 2 deletions crux_kv/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ fn test_set() {
request.operation,
KeyValueOperation::Set {
key: "test".to_string(),
value: 42i32.to_ne_bytes().to_vec().into(),
value: 42i32.to_ne_bytes().to_vec(),
}
);

Expand Down Expand Up @@ -318,7 +318,7 @@ pub fn test_kv_async() -> Result<()> {
request.operation,
KeyValueOperation::Set {
key: "test_num".to_string(),
value: 18u32.to_ne_bytes().to_vec().into(),
value: 18u32.to_ne_bytes().to_vec(),
}
);

Expand Down
1 change: 0 additions & 1 deletion crux_macros/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,6 @@ use syn::parse_macro_input;
/// #[effect(skip)]
/// pub compose: Compose<MyEvent>,
/// }
#[proc_macro_derive(Effect, attributes(effect))]
#[proc_macro_error]
pub fn effect(input: TokenStream) -> TokenStream {
Expand Down

0 comments on commit 5d9f7d4

Please sign in to comment.