From 02752aa1ec1cebc69646a67b24a21cd3e6c71020 Mon Sep 17 00:00:00 2001 From: canxin Date: Fri, 12 Jul 2024 17:32:47 +0800 Subject: [PATCH] [Fix] fix wangyi album save missing musics and music artpic --- lib/src/rust/api/bind/type_bind.dart | 3 +++ lib/src/rust/frb_generated.dart | 18 +++++++++--------- rust/Cargo.lock | 2 +- 3 files changed, 13 insertions(+), 10 deletions(-) diff --git a/lib/src/rust/api/bind/type_bind.dart b/lib/src/rust/api/bind/type_bind.dart index 1eafc52..d6391fe 100644 --- a/lib/src/rust/api/bind/type_bind.dart +++ b/lib/src/rust/api/bind/type_bind.dart @@ -43,6 +43,7 @@ abstract class MusicAggregatorW implements RustOpaqueInterface { Future setDefaultSource({required String source}); + @override String toString(); } @@ -60,6 +61,7 @@ abstract class MusicListW implements RustOpaqueInterface { String source(); + @override String toString(); } @@ -78,5 +80,6 @@ abstract class MusicW implements RustOpaqueInterface { String source(); + @override String toString(); } diff --git a/lib/src/rust/frb_generated.dart b/lib/src/rust/frb_generated.dart index b8639da..90482fe 100644 --- a/lib/src/rust/frb_generated.dart +++ b/lib/src/rust/frb_generated.dart @@ -2483,9 +2483,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { AggregatorOnlineFactoryW dco_decode_aggregator_online_factory_w(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 0) + if (arr.isNotEmpty) throw Exception('unexpected arr length: expect 0 but see ${arr.length}'); - return AggregatorOnlineFactoryW(); + return const AggregatorOnlineFactoryW(); } @protected @@ -2805,9 +2805,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { OnlineFactoryW dco_decode_online_factory_w(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 0) + if (arr.isNotEmpty) throw Exception('unexpected arr length: expect 0 but see ${arr.length}'); - return OnlineFactoryW(); + return const OnlineFactoryW(); } @protected @@ -2960,9 +2960,9 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { SqlFactoryW dco_decode_sql_factory_w(dynamic raw) { // Codec=Dco (DartCObject based), see doc to use other codecs final arr = raw as List; - if (arr.length != 0) + if (arr.isNotEmpty) throw Exception('unexpected arr length: expect 0 but see ${arr.length}'); - return SqlFactoryW(); + return const SqlFactoryW(); } @protected @@ -3118,7 +3118,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { AggregatorOnlineFactoryW sse_decode_aggregator_online_factory_w( SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return AggregatorOnlineFactoryW(); + return const AggregatorOnlineFactoryW(); } @protected @@ -3524,7 +3524,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected OnlineFactoryW sse_decode_online_factory_w(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return OnlineFactoryW(); + return const OnlineFactoryW(); } @protected @@ -3727,7 +3727,7 @@ class RustLibApiImpl extends RustLibApiImplPlatform implements RustLibApi { @protected SqlFactoryW sse_decode_sql_factory_w(SseDeserializer deserializer) { // Codec=Sse (Serialization based), see doc to use other codecs - return SqlFactoryW(); + return const SqlFactoryW(); } @protected diff --git a/rust/Cargo.lock b/rust/Cargo.lock index a39a95c..9d7a0c6 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -1182,7 +1182,7 @@ dependencies = [ [[package]] name = "music_api" version = "0.1.0" -source = "git+https://github.com/canxin121/music_api#02d769b118a85453b8953c8c039ebfcdf28d36a7" +source = "git+https://github.com/canxin121/music_api#fb4602f724506fb83b380b86a9e8ca9c40d8dcb0" dependencies = [ "aes", "anyhow",