Browse Source

Using `is` check instead of `== null`

pull/696/head
Martin Evans 1 year ago
parent
commit
d4f793a7eb
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      LLama/Native/SafeLLamaGrammarHandle.cs

+ 1
- 1
LLama/Native/SafeLLamaGrammarHandle.cs View File

@@ -89,7 +89,7 @@ namespace LLama.Native
public static unsafe SafeLLamaGrammarHandle Create(LLamaGrammarElement** rules, ulong nrules, ulong start_rule_index)
{
var grammar = NativeApi.llama_grammar_init(rules, nrules, start_rule_index);
if (grammar == null)
if (grammar is null)
throw new RuntimeError("Failed to create grammar from rules");

return grammar;


Loading…
Cancel
Save