Skip to content

Commit

Permalink
Upgrade to 1.74 Rust
Browse files Browse the repository at this point in the history
- update Cargo deps
- upgrade pub deps
- upgrade Chrome and Firefox to 119.0 version
  • Loading branch information
tyranron committed Nov 17, 2023
1 parent abb3fcb commit 385f136
Show file tree
Hide file tree
Showing 18 changed files with 414 additions and 327 deletions.
642 changes: 351 additions & 291 deletions Cargo.lock

Large diffs are not rendered by default.

8 changes: 4 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@ IMAGE_NAME := $(strip \
$(if $(call eq,$(image),medea-demo-edge),medea-demo,\
$(or $(image),medea-control-api-mock)))

RUST_VER := 1.73
CHROME_VERSION := 117.0
FIREFOX_VERSION := 118.0.1-driver0.33.0
RUST_VER := 1.74
CHROME_VERSION := 119.0
FIREFOX_VERSION := 119.0.1-driver0.33.0

CARGO_NDK_VER := 3.4.0-ndkr26-rust$(RUST_VER)
CARGO_NDK_VER := 3.4.0-ndkr26b-rust$(RUST_VER)
ANDROID_TARGETS := aarch64-linux-android \
armv7-linux-androideabi \
i686-linux-android \
Expand Down
2 changes: 2 additions & 0 deletions crates/medea-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -51,6 +52,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions crates/medea-reactive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -51,6 +52,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions e2e/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -54,6 +55,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
42 changes: 21 additions & 21 deletions flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,10 @@ packages:
dependency: transitive
description:
name: archive
sha256: "49b1fad315e57ab0bbc15bcbb874e83116a1d78f77ebd500a4af6c9407d6b28e"
sha256: "7b875fd4a20b165a3084bd2d210439b22ebc653f21cea4842729c0c30c82596b"
url: "https://pub.dev"
source: hosted
version: "3.3.8"
version: "3.4.9"
args:
dependency: transitive
description:
Expand Down Expand Up @@ -101,10 +101,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
sha256: ee67cb0715911d28db6bf4af1026078bd6f0128b07a5f66fb2ed94ec6783c09a
url: "https://pub.dev"
source: hosted
version: "1.17.2"
version: "1.18.0"
colorize:
dependency: transitive
description:
Expand Down Expand Up @@ -141,10 +141,10 @@ packages:
dependency: transitive
description:
name: dart_style
sha256: "1efa911ca7086affd35f463ca2fc1799584fb6aa89883cf0af8e3664d6a02d55"
sha256: abd7625e16f51f554ea244d090292945ec4d4be7bfbaf2ec8cccea568919d334
url: "https://pub.dev"
source: hosted
version: "2.3.2"
version: "2.3.3"
fake_async:
dependency: transitive
description:
Expand Down Expand Up @@ -341,10 +341,10 @@ packages:
dependency: transitive
description:
name: meta
sha256: "3c74dbf8763d36539f114c799d8a2d87343b5067e9d796ca22b5eb8437090ee3"
sha256: a6e590c838b18133bb482a2745ad77c5bb7715fb0451209e1a7567d416678b8e
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
mime:
dependency: transitive
description:
Expand Down Expand Up @@ -381,10 +381,10 @@ packages:
dependency: transitive
description:
name: platform
sha256: "4a451831508d7d6ca779f7ac6e212b4023dd5a7d08a27a63da33756410e32b76"
sha256: ae68c7bfcd7383af3629daafb32fb4e8681c7154428da4febcff06200585f102
url: "https://pub.dev"
source: hosted
version: "3.1.0"
version: "3.1.2"
pointycastle:
dependency: transitive
description:
Expand Down Expand Up @@ -498,18 +498,18 @@ packages:
dependency: transitive
description:
name: stack_trace
sha256: c3c7d8edb15bee7f0f74debd4b9c5f3c2ea86766fe4178eb2a18eb30a0bdaed5
sha256: "73713990125a6d93122541237550ee3352a2d84baad52d375a4cad2eb9b7ce0b"
url: "https://pub.dev"
source: hosted
version: "1.11.0"
version: "1.11.1"
stream_channel:
dependency: transitive
description:
name: stream_channel
sha256: "83615bee9045c1d322bbbd1ba209b7a749c2cbcdcb3fdd1df8eb488b3279c1c8"
sha256: ba2aa5d8cc609d96bbb2899c28934f9e1af5cddbd60a827822ea467161eb54e7
url: "https://pub.dev"
source: hosted
version: "2.1.1"
version: "2.1.2"
string_scanner:
dependency: transitive
description:
Expand Down Expand Up @@ -538,10 +538,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
sha256: "5c2f730018264d276c20e4f1503fd1308dfbbae39ec8ee63c5236311ac06954b"
url: "https://pub.dev"
source: hosted
version: "0.6.0"
version: "0.6.1"
tuple:
dependency: transitive
description:
Expand Down Expand Up @@ -578,10 +578,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
sha256: c538be99af830f478718b51630ec1b6bee5e74e52c8a802d328d9e71d35d2583
url: "https://pub.dev"
source: hosted
version: "11.7.1"
version: "11.10.0"
watcher:
dependency: transitive
description:
Expand All @@ -594,10 +594,10 @@ packages:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
sha256: afe077240a270dcfd2aafe77602b4113645af95d0ad31128cc02bce5ac5d5152
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
version: "0.3.0"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -623,5 +623,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.1.0-185.0.dev <4.0.0"
dart: ">=3.2.0-194.0.dev <4.0.0"
flutter: ">=3.10.0"
3 changes: 1 addition & 2 deletions flutter/lib/src/native/ffi/jason_api.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3838,8 +3838,7 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {

late final _wire_media_manager_handle_microphone_volume_is_availablePtr =
_lookup<
ffi
.NativeFunction<
ffi.NativeFunction<
WireSyncReturn Function(wire_MediaManagerHandle)>>(
'wire_media_manager_handle_microphone_volume_is_available');
late final _wire_media_manager_handle_microphone_volume_is_available =
Expand Down
2 changes: 1 addition & 1 deletion flutter/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ dev_dependencies:
build_runner: ^2.4.5
ffigen: 8.0.2
flutter_gherkin: 3.0.0-rc.17
flutter_lints: ^2.0.1
flutter_lints: ^3.0.1
flutter_test:
sdk: flutter
freezed: ^2.2.0
Expand Down
2 changes: 2 additions & 0 deletions mock/control-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -50,6 +51,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions mock/control-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -50,6 +51,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions proto/client-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -52,6 +53,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions proto/control-api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -52,6 +53,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
2 changes: 2 additions & 0 deletions proto/control-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -51,6 +52,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
3 changes: 2 additions & 1 deletion src/api/err.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
//! External API errors.

#![allow(clippy::multiple_inherent_impl)] // for `wasm_bindgen`
// For `wasm_bindgen`.
#![allow(clippy::mem_forget, clippy::multiple_inherent_impl)]

use std::borrow::Cow;

Expand Down
9 changes: 9 additions & 0 deletions src/api/wasm/media_manager_handle.rs
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,15 @@ impl MediaManagerHandle {
}

/// Subscribes onto the [`MediaManagerHandle`]'s `devicechange` event.
///
/// # Errors
///
/// With a [`StateError`] if an underlying object has been disposed, e.g.
/// `free` was called on this [`MediaManagerHandle`], or on a [`Jason`] that
/// implicitly owns native object behind this [`MediaManagerHandle`].
///
/// [`Jason`]: crate::api::Jason
/// [`StateError`]: crate::api::err::StateError
pub fn on_device_change(
&self,
cb: js_sys::Function,
Expand Down
10 changes: 3 additions & 7 deletions src/api/wasm/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@
//!
//! [`Jason`]: crate::api::Jason

// For `wasm_bindgen`.
#![allow(clippy::mem_forget)]

pub mod connection_handle;
pub mod err;
pub mod jason;
Expand Down Expand Up @@ -244,10 +247,3 @@ impl From<media::MediaDirection> for MediaDirection {
}
}
}

impl From<MediaDirection> for JsValue {
#[allow(clippy::as_conversions)]
fn from(val: MediaDirection) -> Self {
Self::from(val as u8)
}
}
2 changes: 2 additions & 0 deletions src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
clippy::format_push_string,
clippy::get_unwrap,
clippy::if_then_some_else_none,
clippy::implied_bounds_in_impls,
clippy::imprecise_flops,
clippy::index_refutable_slice,
clippy::iter_on_empty_collections,
Expand All @@ -50,6 +51,7 @@
clippy::map_err_ignore,
clippy::mem_forget,
clippy::missing_assert_message,
clippy::missing_asserts_for_indexing,
clippy::missing_const_for_fn,
clippy::missing_docs_in_private_items,
clippy::multiple_inherent_impl,
Expand Down
4 changes: 4 additions & 0 deletions src/utils/component.rs
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,10 @@ pub trait IntoResult {
type Error: Display;

/// Coerces into the [`Result`].
///
/// # Errors
///
/// If coerces into a [`Result::Err`].
fn into_result(self) -> Result<(), Self::Error>;
}

Expand Down

0 comments on commit 385f136

Please sign in to comment.