Skip to content

Commit 93a1835

Browse files
committed
remove unnecessary default value
1 parent 775671e commit 93a1835

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -289,9 +289,9 @@ public static bool operator !(Foo x) => !x.value;
289289
```csharp
290290
public static GroupId New();
291291
public static GroupId NewGroupId();
292-
// .NET 9.0+
293-
public static GroupId New(bool uuidV7 = false);
294-
public static GroupId NewGroupId(bool uuidV7 = false);
292+
// overload .NET 9.0+
293+
public static GroupId New(bool uuidV7);
294+
public static GroupId NewGroupId(bool uuidV7);
295295
```
296296

297297
Second parameter `UnitGenerateOptions options` can configure which method to implement, default is `None`.

src/UnitGenerator/SourceGenerator.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -555,12 +555,12 @@ public bool TryFormat (Span<byte> utf8Destination, out int bytesWritten, ReadOnl
555555
}
556556
557557
#if NET9_0_OR_GREATER
558-
public static {{unitTypeName}} New(bool uuidV7 = false)
558+
public static {{unitTypeName}} New(bool uuidV7)
559559
{
560560
return new {{unitTypeName}}(uuidV7 ? Guid.CreateVersion7() : Guid.NewGuid());
561561
}
562562
563-
public static {{unitTypeName}} New{{unitTypeName}}(bool uuidV7 = false)
563+
public static {{unitTypeName}} New{{unitTypeName}}(bool uuidV7)
564564
{
565565
return new {{unitTypeName}}(uuidV7 ? Guid.CreateVersion7() : Guid.NewGuid());
566566
}

0 commit comments

Comments
 (0)