Skip to content

Commit

Permalink
remove unnecessary default value
Browse files Browse the repository at this point in the history
  • Loading branch information
Funkest committed Nov 19, 2024
1 parent 775671e commit 93a1835
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -289,9 +289,9 @@ public static bool operator !(Foo x) => !x.value;
```csharp
public static GroupId New();
public static GroupId NewGroupId();
// .NET 9.0+
public static GroupId New(bool uuidV7 = false);
public static GroupId NewGroupId(bool uuidV7 = false);
// overload .NET 9.0+
public static GroupId New(bool uuidV7);
public static GroupId NewGroupId(bool uuidV7);
```

Second parameter `UnitGenerateOptions options` can configure which method to implement, default is `None`.
Expand Down
4 changes: 2 additions & 2 deletions src/UnitGenerator/SourceGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -555,12 +555,12 @@ public bool TryFormat (Span<byte> utf8Destination, out int bytesWritten, ReadOnl
}
#if NET9_0_OR_GREATER
public static {{unitTypeName}} New(bool uuidV7 = false)
public static {{unitTypeName}} New(bool uuidV7)
{
return new {{unitTypeName}}(uuidV7 ? Guid.CreateVersion7() : Guid.NewGuid());
}
public static {{unitTypeName}} New{{unitTypeName}}(bool uuidV7 = false)
public static {{unitTypeName}} New{{unitTypeName}}(bool uuidV7)
{
return new {{unitTypeName}}(uuidV7 ? Guid.CreateVersion7() : Guid.NewGuid());
}
Expand Down

0 comments on commit 93a1835

Please sign in to comment.