fix(collection): 抑制类型转换警告并更新文件时间戳修复了 Collection.kt 文件中的类型转换警告问题,通过添加 @Suppress("UNCHECKED_CAST")

注解来抑制编译器警告。同时更新了文件的最后修改时
This commit is contained in:
Armamem0t 2025-09-20 14:05:41 +08:00
parent 075dc2346a
commit 578f0a3e89
Signed by: minglipro
GPG Key ID: 5F355A77B22AA93B

View File

@ -16,7 +16,7 @@
* ProjectName mingli-utils
* ModuleName mingli-utils.main
* CurrentFile Collection.kt
* LastUpdate 2025-09-20 14:01:07
* LastUpdate 2025-09-20 14:03:46
* UpdateUser MingLiPro
*/
@ -47,6 +47,7 @@ inline fun <reified T> Collection<T>.toArray(): Array<T> {
* @param v 用于生成映射值的函数
* @return 转换后的 Map
*/
@Suppress("UNCHECKED_CAST")
inline fun <reified T, V> Collection<T>.toMap(noinline v: (T) -> V): Map<T, V> {
return this.stream().collect(
SuperStream.toMap(