Skip to content

Commit

Permalink
A few fsharp-analyzers suggestions
Browse files Browse the repository at this point in the history
  • Loading branch information
Numpsy committed Aug 23, 2024
1 parent a7d2f85 commit 417a09e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions Expecto/Expecto.Impl.fs
Original file line number Diff line number Diff line change
Expand Up @@ -960,7 +960,7 @@ module Impl =
else
let nestedFunc =
t.GetTypeInfo().GetFields()
|> Seq.tryFind (fun f -> isFsharpFuncType f.FieldType)
|> Array.tryFind (fun f -> isFsharpFuncType f.FieldType)
match nestedFunc with
| Some f -> f.GetValue(testFunc).GetType()
| None -> t
Expand All @@ -969,7 +969,7 @@ module Impl =
match testCode with
| Sync test ->
let t = getFuncTypeToUse test asm
let m = t.GetTypeInfo().GetMethods () |> Seq.find (fun m -> (m.Name = "Invoke") && (m.DeclaringType = t))
let m = t.GetTypeInfo().GetMethods () |> Array.find (fun m -> (m.Name = "Invoke") && (m.DeclaringType = t))
(t.FullName, m.Name)
| SyncWithCancel _ ->
("Unknown SyncWithCancel", "Unknown SyncWithCancel")
Expand Down
2 changes: 1 addition & 1 deletion Expecto/Expecto.fs
Original file line number Diff line number Diff line change
Expand Up @@ -543,7 +543,7 @@ module Tests =
match Args.parseOptions options args with
| Ok cliArguments ->
let config =
Seq.fold (fun s a -> foldCLIArgumentToConfig a s) baseConfig cliArguments
List.fold (fun s a -> foldCLIArgumentToConfig a s) baseConfig cliArguments
if List.exists(function List_Tests _ -> true | _ -> false) cliArguments then
ArgsList config
elif List.contains Version cliArguments then
Expand Down

0 comments on commit 417a09e

Please sign in to comment.