Skip to content

Commit

Permalink
Make Qodana happy.
Browse files Browse the repository at this point in the history
  • Loading branch information
Corniel committed Aug 28, 2023
1 parent bcd776a commit a5eb03e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 7 deletions.
3 changes: 1 addition & 2 deletions Src/FluentAssertions/Extensions/DateBuilder.cs
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,7 @@ internal DateBuilder(int year, int month, int day)
/// <summary>
/// Returns a new <see cref="DateTimeOffset"/> value with specified offset.
/// </summary>
public DateTimeOffset WithOffset(TimeSpan offset = default)
=> new DateTimeOffset(date, offset);
public DateTimeOffset WithOffset(TimeSpan offset) => new(date, offset);

/// <inheritdoc />
public override string ToString() => date.ToString("yyyy-MM-dd", CultureInfo.InvariantCulture);
Expand Down
6 changes: 1 addition & 5 deletions Src/FluentAssertions/Extensions/FluentDateTimeExtensions.cs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
using System;
using System.Diagnostics;
using FluentAssertions.Common;

namespace FluentAssertions.Extensions;

Expand Down Expand Up @@ -306,8 +305,5 @@ public static DateTimeOffset AddMicroseconds(this DateTimeOffset self, long micr
/// Returns new <see cref="DateTimeOffset"/> that uses <paramref name="self"/>
/// as its datetime and <paramref name="offset"/> as its offset.
/// </summary>
public static DateTimeOffset WithOffset(this DateTime self, TimeSpan offset)
{
return self.ToDateTimeOffset(offset);
}
public static DateTimeOffset WithOffset(this DateTime self, TimeSpan offset) => new(self, offset);
}

0 comments on commit a5eb03e

Please sign in to comment.