Skip to content

Commit

Permalink
fix: clippy & rustfmt
Browse files Browse the repository at this point in the history
Signed-off-by: Lachezar Lechev <[email protected]>
  • Loading branch information
elpiel committed Aug 4, 2023
1 parent 9e25da1 commit 9d3a5e4
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 9 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,9 @@ jobs:
- name: Build code
run: cargo build
- name: Lint code format
run: cargo fmt --all -- --check
run: cargo fmt --all --check
- name: Lint code
run: cargo clippy --all -- -D warnings
run: cargo clippy --no-deps -- -D warnings

# MSRV
- name: Check MSRV
Expand Down
2 changes: 1 addition & 1 deletion build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ fn main() {
println!("cargo:rerun-if-changed={display_path}");
}
let file_descriptors =
protox::compile(proto_paths, &[proto_dir]).expect("Expected file descriptors");
protox::compile(proto_paths, [proto_dir]).expect("Expected file descriptors");
Config::new()
.compile_well_known_types()
.out_dir("src/commonMain/rust/protobuf")
Expand Down
4 changes: 2 additions & 2 deletions src/commonMain/rust/bridge/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -18,10 +18,10 @@ impl ToProtobuf<runtime::Event, ()> for Event {
runtime::event::LibraryItemsPushedToStorage { ids: ids.clone() },
)
}
Event::StreamsPushedToStorage { uid } => {
Event::StreamsPushedToStorage { uid: _ } => {
todo!()
}
Event::NotificationsPushedToStorage { ids } => {
Event::NotificationsPushedToStorage { ids: _ } => {
todo!()
}
Event::UserPulledFromAPI { uid } => {
Expand Down
2 changes: 1 addition & 1 deletion src/commonMain/rust/env/kotlin_class_name.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
use std::convert::TryFrom;
use std::hash::Hash;
use strum::{IntoEnumIterator, EnumIter};
use strum::{EnumIter, IntoEnumIterator};

#[derive(Clone, PartialEq, Eq, Hash, EnumIter)]
#[allow(non_camel_case_types)]
Expand Down
8 changes: 5 additions & 3 deletions src/commonMain/rust/stremio_core_android.rs
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,11 @@ pub unsafe extern "C" fn Java_com_stremio_core_Core_initializeNative(
library.merge_bucket(other_bucket);
};
let streams = streams.unwrap_or(StreamsBucket::new(profile.uid()));
let notifications = notifications.unwrap_or(
NotificationsBucket::new::<AndroidEnv>(profile.uid(), vec![]),
);
let notifications = notifications.unwrap_or(NotificationsBucket::new::<
AndroidEnv,
>(
profile.uid(), vec![]
));
let (model, effects) =
AndroidModel::new(profile, library, streams, notifications);
let (runtime, rx) = Runtime::<AndroidEnv, _>::new(
Expand Down

0 comments on commit 9d3a5e4

Please sign in to comment.