Skip to content

Commit

Permalink
Upgrade to 1.82 Rust
Browse files Browse the repository at this point in the history
- tune Clippy lints
- update Cargo deps
- upgrade Firefox to 131.0.3 version
  • Loading branch information
tyranron committed Oct 21, 2024
1 parent 42dfdf3 commit 936b911
Show file tree
Hide file tree
Showing 19 changed files with 378 additions and 297 deletions.
478 changes: 251 additions & 227 deletions Cargo.lock

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ medea-client-api-proto = { version = "0.7.0-dev", path = "proto/client-api" }
medea-macro = { version = "0.3", path = "crates/medea-macro" }
medea-reactive = { version = "0.1", path = "crates/medea-reactive" }
mockall = { version = "0.13", optional = true }
sealed = "0.5"
sealed = "0.6"
serde = { version = "1.0", features = ["derive"] }
serde_json = "1.0"
tracerr = "0.3"
Expand Down
6 changes: 3 additions & 3 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.81
RUST_VER := 1.82
CHROME_VERSION := 128.0
FIREFOX_VERSION := 130.0-driver0.35.0
FIREFOX_VERSION := 131.0.3-driver0.35.0

CARGO_NDK_VER := 3.5.4-ndkr27b-rust$(RUST_VER)
CARGO_NDK_VER := 3.5.4-ndkr27c-rust$(RUST_VER)
ANDROID_TARGETS := aarch64-linux-android \
armv7-linux-androideabi \
i686-linux-android \
Expand Down
3 changes: 1 addition & 2 deletions crates/medea-macro/src/dart_bridge.rs
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,7 @@ impl ModExpander {
format!("Cannot read `CARGO_MANIFEST_DIR` env var: {e}"),
)
})?;
let mut path = PathBuf::from(root_path);
path.push(get_path_arg(relative_path)?);
let path = PathBuf::from(root_path).join(get_path_arg(relative_path)?);

let mut file = File::create(path).map_err(|e| {
syn::Error::new(
Expand Down
3 changes: 3 additions & 0 deletions crates/medea-macro/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -102,6 +103,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -115,6 +117,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
9 changes: 5 additions & 4 deletions crates/medea-reactive/src/collections/hash_map.rs
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,11 @@ use crate::subscribers_store::{
};

/// Reactive hash map based on [`HashMap`][1] with additional functionality of
/// tracking progress made by its subscribers. Its [`HashMap::on_insert()`] and
/// [`HashMap::on_remove()`] subscriptions return values wrapped in
/// [`progressable::Guarded`], and implementation tracks all
/// [`progressable::Guard`]s.
/// tracking progress made by its subscribers.
///
/// Its [`HashMap::on_insert()`] and [`HashMap::on_remove()`] subscriptions
/// return values wrapped in [`progressable::Guarded`], and implementation
/// tracks all [`progressable::Guard`]s.
///
/// [1]: std::collections::HashMap
pub type ProgressableHashMap<K, V> = HashMap<
Expand Down
7 changes: 4 additions & 3 deletions crates/medea-reactive/src/collections/vec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,10 @@ use crate::subscribers_store::{
};

/// Reactive vector based on [`Vec`] with additional functionality of tracking
/// progress made by its subscribers. Its [`Vec::on_push()`] and
/// [`Vec::on_remove()`] subscriptions return values wrapped in a
/// [`progressable::Guarded`], and the implementation tracks all
/// progress made by its subscribers.
///
/// Its [`Vec::on_push()`] and [`Vec::on_remove()`] subscriptions return values
/// wrapped in a [`progressable::Guarded`], and the implementation tracks all
/// [`progressable::Guard`]s.
pub type ProgressableVec<T> =
Vec<T, progressable::SubStore<T>, progressable::Guarded<T>>;
Expand Down
3 changes: 3 additions & 0 deletions crates/medea-reactive/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -102,6 +103,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -115,6 +117,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
3 changes: 3 additions & 0 deletions e2e/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -105,6 +106,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -118,6 +120,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
3 changes: 3 additions & 0 deletions mock/control-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -101,6 +102,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -114,6 +116,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
3 changes: 3 additions & 0 deletions mock/control-api/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -71,6 +71,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -101,6 +102,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -114,6 +116,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
3 changes: 3 additions & 0 deletions proto/client-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -103,6 +104,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -116,6 +118,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down
20 changes: 12 additions & 8 deletions proto/client-api/src/stats.rs
Original file line number Diff line number Diff line change
Expand Up @@ -903,11 +903,13 @@ pub struct RtcIceCandidatePairStats {
pub available_outgoing_bitrate: Option<u64>,
}

/// Each candidate pair in the check list has a foundation and a state.
/// The foundation is the combination of the foundations of the local and
/// remote candidates in the pair. The state is assigned once the check
/// list for each media stream has been computed. There are five
/// potential values that the state can have.
/// Possible states of a candidate pair.
///
/// > Each candidate pair in the check list has a foundation and a state.
/// > The foundation is the combination of the foundations of the local and
/// > remote candidates in the pair. The state is assigned once the check
/// > list for each media stream has been computed. There are five
/// > potential values that the state can have.
#[derive(Clone, Copy, Debug, Deserialize, Eq, Hash, PartialEq, Serialize)]
#[serde(rename_all = "kebab-case")]
pub enum KnownIceCandidatePairState {
Expand Down Expand Up @@ -1423,9 +1425,11 @@ pub enum MediaKind {
}

/// Statistics for the media produced by a [MediaStreamTrack][1] that is
/// currently attached to an [RTCRtpSender]. This reflects the media that is fed
/// to the encoder after [getUserMedia] constraints have been applied (i.e. not
/// the raw media produced by the camera).
/// currently attached to an [RTCRtpSender].
///
/// This reflects the media that is fed to the encoder after [getUserMedia]
/// constraints have been applied (i.e. not the raw media produced by the
/// camera).
///
/// [`RtcStatsType::MediaSource`] variant.
///
Expand Down
5 changes: 4 additions & 1 deletion proto/control-api/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
clippy::or_fun_call,
clippy::panic_in_result_fn,
clippy::partial_pub_fields,
clippy::pathbuf_init_then_push,
clippy::pedantic,
clippy::print_stderr,
clippy::print_stdout,
Expand Down Expand Up @@ -103,6 +104,7 @@
clippy::suspicious_xor_used_as_pow,
clippy::tests_outside_test_module,
clippy::todo,
clippy::too_long_first_doc_paragraph,
clippy::trailing_empty_array,
clippy::transmute_undefined_repr,
clippy::trivial_regex,
Expand All @@ -116,6 +118,7 @@
clippy::unnecessary_struct_initialization,
clippy::unneeded_field_pattern,
clippy::unused_peekable,
clippy::unused_result_ok,
clippy::unwrap_in_result,
clippy::unwrap_used,
clippy::use_debug,
Expand Down Expand Up @@ -202,7 +205,7 @@ mod grpc {
&& out.ends_with("api.rs")),
)
.emit_rerun_if_changed(false)
.compile(&[proto], &[GRPC_DIR.to_owned()])?;
.compile_protos(&[proto], &[GRPC_DIR.to_owned()])?;
}

Ok(())
Expand Down
Loading

0 comments on commit 936b911

Please sign in to comment.