Skip to content

Commit

Permalink
fix clippy
Browse files Browse the repository at this point in the history
  • Loading branch information
rogurotus committed Aug 25, 2023
1 parent fc3f725 commit f2e1eb2
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 44 deletions.
34 changes: 21 additions & 13 deletions flutter/example/pubspec.lock
Original file line number Diff line number Diff line change
Expand Up @@ -101,10 +101,10 @@ packages:
dependency: transitive
description:
name: collection
sha256: "4a07be6cb69c84d677a6c3096fcf960cc3285a8330b4603e0d463d15d9bd934c"
sha256: f092b211a4319e98e5ff58223576de6c2803db36221657b46c82574721240687
url: "https://pub.dev"
source: hosted
version: "1.17.1"
version: "1.17.2"
colorize:
dependency: transitive
description:
Expand Down Expand Up @@ -310,18 +310,18 @@ packages:
dependency: transitive
description:
name: matcher
sha256: "6501fbd55da300384b768785b83e5ce66991266cec21af89ab9ae7f5ce1c4cbb"
sha256: "1803e76e6653768d64ed8ff2e1e67bea3ad4b923eb5c56a295c3e634bad5960e"
url: "https://pub.dev"
source: hosted
version: "0.12.15"
version: "0.12.16"
material_color_utilities:
dependency: transitive
description:
name: material_color_utilities
sha256: d92141dc6fe1dad30722f9aa826c7fbc896d021d792f80678280601aff8cf724
sha256: "9528f2f296073ff54cb9fee677df673ace1218163c3bc7628093e7eed5203d41"
url: "https://pub.dev"
source: hosted
version: "0.2.0"
version: "0.5.0"
medea_flutter_webrtc:
dependency: "direct main"
description:
Expand Down Expand Up @@ -490,10 +490,10 @@ packages:
dependency: transitive
description:
name: source_span
sha256: dd904f795d4b4f3b870833847c461801f6750a9fa8e61ea5ac53f9422b31f250
sha256: "53e943d4206a5e30df338fd4c6e7a077e02254531b138a15aec3bd143c1a8b3c"
url: "https://pub.dev"
source: hosted
version: "1.9.1"
version: "1.10.0"
stack_trace:
dependency: transitive
description:
Expand Down Expand Up @@ -538,10 +538,10 @@ packages:
dependency: transitive
description:
name: test_api
sha256: eb6ac1540b26de412b3403a163d919ba86f6a973fe6cc50ae3541b80092fdcfb
sha256: "75760ffd7786fffdfb9597c35c5b27eaeec82be8edfb6d71d32651128ed7aab8"
url: "https://pub.dev"
source: hosted
version: "0.5.1"
version: "0.6.0"
tuple:
dependency: transitive
description:
Expand Down Expand Up @@ -578,10 +578,10 @@ packages:
dependency: transitive
description:
name: vm_service
sha256: f6deed8ed625c52864792459709183da231ebf66ff0cf09e69b573227c377efe
sha256: c620a6f783fa22436da68e42db7ebbf18b8c44b9a46ab911f666ff09ffd9153f
url: "https://pub.dev"
source: hosted
version: "11.3.0"
version: "11.7.1"
watcher:
dependency: transitive
description:
Expand All @@ -590,6 +590,14 @@ packages:
url: "https://pub.dev"
source: hosted
version: "1.1.0"
web:
dependency: transitive
description:
name: web
sha256: dc8ccd225a2005c1be616fe02951e2e342092edf968cf0844220383757ef8f10
url: "https://pub.dev"
source: hosted
version: "0.1.4-beta"
web_socket_channel:
dependency: transitive
description:
Expand All @@ -615,5 +623,5 @@ packages:
source: hosted
version: "3.1.2"
sdks:
dart: ">=3.0.0 <4.0.0"
dart: ">=3.1.0-185.0.dev <4.0.0"
flutter: ">=3.10.0"
51 changes: 26 additions & 25 deletions flutter/lib/src/native/ffi/jason_api.g.dart
Original file line number Diff line number Diff line change
Expand Up @@ -3838,7 +3838,8 @@ 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 Expand Up @@ -4535,9 +4536,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _new_box_autoadd_api_constrain_facing_mode_0Ptr = _lookup<
ffi.NativeFunction<
ffi.Pointer<wire_ApiConstrainFacingMode>
Function()>>('new_box_autoadd_api_constrain_facing_mode_0');
ffi
.NativeFunction<ffi.Pointer<wire_ApiConstrainFacingMode> Function()>>(
'new_box_autoadd_api_constrain_facing_mode_0');
late final _new_box_autoadd_api_constrain_facing_mode_0 =
_new_box_autoadd_api_constrain_facing_mode_0Ptr
.asFunction<ffi.Pointer<wire_ApiConstrainFacingMode> Function()>();
Expand Down Expand Up @@ -4576,9 +4577,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _new_box_autoadd_api_media_stream_settings_0Ptr = _lookup<
ffi.NativeFunction<
ffi.Pointer<wire_ApiMediaStreamSettings>
Function()>>('new_box_autoadd_api_media_stream_settings_0');
ffi
.NativeFunction<ffi.Pointer<wire_ApiMediaStreamSettings> Function()>>(
'new_box_autoadd_api_media_stream_settings_0');
late final _new_box_autoadd_api_media_stream_settings_0 =
_new_box_autoadd_api_media_stream_settings_0Ptr
.asFunction<ffi.Pointer<wire_ApiMediaStreamSettings> Function()>();
Expand Down Expand Up @@ -4632,9 +4633,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _new_uint_8_list_0Ptr = _lookup<
ffi.NativeFunction<
ffi.Pointer<wire_uint_8_list> Function(
ffi.Int32)>>('new_uint_8_list_0');
ffi
.NativeFunction<ffi.Pointer<wire_uint_8_list> Function(ffi.Int32)>>(
'new_uint_8_list_0');
late final _new_uint_8_list_0 = _new_uint_8_list_0Ptr
.asFunction<ffi.Pointer<wire_uint_8_list> Function(int)>();

Expand Down Expand Up @@ -4849,9 +4850,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _inflate_ApiConstrainFacingMode_ExactPtr = _lookup<
ffi.NativeFunction<
ffi.Pointer<ApiConstrainFacingModeKind>
Function()>>('inflate_ApiConstrainFacingMode_Exact');
ffi
.NativeFunction<ffi.Pointer<ApiConstrainFacingModeKind> Function()>>(
'inflate_ApiConstrainFacingMode_Exact');
late final _inflate_ApiConstrainFacingMode_Exact =
_inflate_ApiConstrainFacingMode_ExactPtr
.asFunction<ffi.Pointer<ApiConstrainFacingModeKind> Function()>();
Expand All @@ -4862,9 +4863,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _inflate_ApiConstrainFacingMode_IdealPtr = _lookup<
ffi.NativeFunction<
ffi.Pointer<ApiConstrainFacingModeKind>
Function()>>('inflate_ApiConstrainFacingMode_Ideal');
ffi
.NativeFunction<ffi.Pointer<ApiConstrainFacingModeKind> Function()>>(
'inflate_ApiConstrainFacingMode_Ideal');
late final _inflate_ApiConstrainFacingMode_Ideal =
_inflate_ApiConstrainFacingMode_IdealPtr
.asFunction<ffi.Pointer<ApiConstrainFacingModeKind> Function()>();
Expand Down Expand Up @@ -4988,9 +4989,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _set_video_constraint_valuePtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Handle, ffi.Int64, DartValue)>>('set_video_constraint_value');
ffi
.NativeFunction<ffi.Void Function(ffi.Handle, ffi.Int64, DartValue)>>(
'set_video_constraint_value');
late final _set_video_constraint_value = _set_video_constraint_valuePtr
.asFunction<void Function(Object, int, DartValue)>();

Expand All @@ -5007,9 +5008,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _set_audio_constraint_valuePtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Handle, ffi.Int64, DartValue)>>('set_audio_constraint_value');
ffi
.NativeFunction<ffi.Void Function(ffi.Handle, ffi.Int64, DartValue)>>(
'set_audio_constraint_value');
late final _set_audio_constraint_value = _set_audio_constraint_valuePtr
.asFunction<void Function(Object, int, DartValue)>();

Expand Down Expand Up @@ -5988,9 +5989,9 @@ class MedeaJasonWire implements FlutterRustBridgeWireBase {
}

late final _Callback__callPtr = _lookup<
ffi.NativeFunction<
ffi.Void Function(
ffi.Pointer<ffi.Int>, DartValue)>>('Callback__call');
ffi
.NativeFunction<ffi.Void Function(ffi.Pointer<ffi.Int>, DartValue)>>(
'Callback__call');
late final _Callback__call = _Callback__callPtr.asFunction<
void Function(ffi.Pointer<ffi.Int>, DartValue)>();

Expand Down
1 change: 1 addition & 0 deletions mock/control-api/src/callback/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ impl Handler<GetCallbackItems> for GrpcCallbackServer {
/// # Panics
///
/// If cannot bind and run gRPC server.
#[allow(clippy::unused_async)]
pub async fn run(opts: &Cli) -> Addr<GrpcCallbackServer> {
let events = Arc::new(Mutex::new(Vec::new()));

Expand Down
2 changes: 2 additions & 0 deletions src/room.rs
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ impl RoomHandle {
///
/// Helper function for all the exported mute/unmute/enable/disable
/// audio/video send/receive methods.
#[allow(clippy::redundant_closure_call)]
fn change_media_state<S>(
&self,
new_state: S,
Expand Down Expand Up @@ -1443,6 +1444,7 @@ impl InnerRoom {
/// [`Sender`]: peer::media::Sender
/// [1]: https://tinyurl.com/rnxcavf
#[async_recursion(?Send)]
#[allow(clippy::redundant_closure_call)]
async fn set_local_media_settings(
&self,
new_settings: MediaStreamSettings,
Expand Down
9 changes: 3 additions & 6 deletions src/rpc/websocket/client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -355,11 +355,11 @@ impl WebSocketRpcClient {

/// Starts [`Heartbeat`] with provided [`RpcSettings`] for provided
/// [`platform::RpcTransport`].
async fn start_heartbeat(
fn start_heartbeat(
self: Rc<Self>,
transport: Rc<dyn platform::RpcTransport>,
rpc_settings: RpcSettings,
) -> Result<(), Traced<RpcClientError>> {
) {
let idle_timeout = IdleTimeout(Duration::from_millis(
rpc_settings.idle_timeout_ms.into(),
));
Expand All @@ -380,8 +380,6 @@ impl WebSocketRpcClient {
}
});
self.0.borrow_mut().heartbeat = Some(heartbeat);

Ok(())
}

/// Tries to establish [`WebSocketRpcClient`] connection.
Expand Down Expand Up @@ -409,8 +407,7 @@ impl WebSocketRpcClient {
if let Some(msg) = on_message.next().await {
if let ServerMsg::RpcSettings(rpc_settings) = msg {
Rc::clone(&self)
.start_heartbeat(Rc::clone(&transport), rpc_settings)
.await?;
.start_heartbeat(Rc::clone(&transport), rpc_settings);
} else {
let close_reason =
ClosedStateReason::FirstServerMsgIsNotRpcSettings;
Expand Down

0 comments on commit f2e1eb2

Please sign in to comment.