From 852ef6403482ad865ac65b2522e141680e07c1b8 Mon Sep 17 00:00:00 2001 From: vis2k Date: Sun, 22 Aug 2021 20:42:11 +0800 Subject: [PATCH] Weaver: syntax --- .../Weaver/EntryPoint/CompilationFinishedHook.cs | 13 ++----------- 1 file changed, 2 insertions(+), 11 deletions(-) diff --git a/Assets/Mirror/Editor/Weaver/EntryPoint/CompilationFinishedHook.cs b/Assets/Mirror/Editor/Weaver/EntryPoint/CompilationFinishedHook.cs index 547b357a7..353efbd32 100644 --- a/Assets/Mirror/Editor/Weaver/EntryPoint/CompilationFinishedHook.cs +++ b/Assets/Mirror/Editor/Weaver/EntryPoint/CompilationFinishedHook.cs @@ -60,17 +60,8 @@ public static void WeaveExistingAssemblies() #endif } - static Assembly FindMirrorRuntime() - { - foreach (Assembly assembly in CompilationPipeline.GetAssemblies()) - { - if (assembly.name == MirrorRuntimeAssemblyName) - { - return assembly; - } - } - return null; - } + static Assembly FindMirrorRuntime() => + CompilationPipeline.GetAssemblies().First(assembly => assembly.name == MirrorRuntimeAssemblyName); static bool CompilerMessagesContainError(CompilerMessage[] messages) {