Skip to content

Commit 71e0ef0

Browse files
committed
R# Cleanup
1 parent b92f473 commit 71e0ef0

File tree

63 files changed

+87
-132
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+87
-132
lines changed

FdbShell/Commands/BasicCommands.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ public static async Task Dir(string[] path, IFdbTuple extras, DirectoryBrowseOpt
7373
}
7474
else
7575
{
76-
log.WriteLine(" {0,-12} {1,-12} {3,9:N0} {2}", FdbKey.Dump(subfolder.Copy().Key), subfolder.Layer.IsNullOrEmpty ? "-" : ("<" + subfolder.Layer.ToUnicode() + ">"), name, "-");
76+
log.WriteLine(" {0,-12} {1,-12} {3,9} {2}", FdbKey.Dump(subfolder.Copy().Key), subfolder.Layer.IsNullOrEmpty ? "-" : ("<" + subfolder.Layer.ToUnicode() + ">"), name, "-");
7777
}
7878
}
7979
else

FdbShell/Mono.Options/Options.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1081,7 +1081,7 @@ protected virtual bool Parse (string argument, OptionContext c)
10811081
if (ParseBool (argument, n, c))
10821082
return true;
10831083
// is it a bundled option?
1084-
if (ParseBundledValue (f, string.Concat (n + s + v), c))
1084+
if (ParseBundledValue (f, n + s + v, c))
10851085
return true;
10861086

10871087
return false;

FoundationDB.Client/Async/AsyncBuffer.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ namespace FoundationDB.Async
3434
using JetBrains.Annotations;
3535
using System;
3636
using System.Collections.Generic;
37-
using System.Diagnostics;
3837
using System.Runtime.ExceptionServices;
3938
using System.Threading;
4039
using System.Threading.Tasks;

FoundationDB.Client/Async/AsyncCancellableMutex.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ private static void CancellationHandler(object state)
7373

7474
var weakRef = (WeakReference<AsyncCancelableMutex>)state;
7575
AsyncCancelableMutex waiter;
76-
if (weakRef.TryGetTarget(out waiter) && waiter != null)
76+
if (weakRef.TryGetTarget(out waiter))
7777
{ // still alive...
7878
waiter.Abort(async: true);
7979
}

FoundationDB.Client/Async/AsyncProducerConsumerQueue.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
3030

3131
namespace FoundationDB.Async
3232
{
33-
using FoundationDB.Client.Utils;
3433
using System;
3534
using System.Diagnostics;
3635
using System.Runtime.CompilerServices;

FoundationDB.Client/Async/AsyncPump.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
3030

3131
namespace FoundationDB.Async
3232
{
33-
using FoundationDB.Client.Utils;
3433
using JetBrains.Annotations;
3534
using System;
3635
using System.Diagnostics;

FoundationDB.Client/Async/AsyncTransform.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,6 @@ namespace FoundationDB.Async
3030
{
3131
using JetBrains.Annotations;
3232
using System;
33-
using System.Diagnostics;
3433
using System.Runtime.ExceptionServices;
3534
using System.Threading;
3635
using System.Threading.Tasks;

FoundationDB.Client/Async/Maybe.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,7 @@ public void ThrowForNonSuccess()
122122
if (exception == null)
123123
{
124124
((ExceptionDispatchInfo)m_errorContainer).Throw();
125+
return; // never reached, but helps with code analysis
125126
}
126127
#endif
127128
throw exception;

FoundationDB.Client/Async/TaskHelpers.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -375,7 +375,7 @@ public static void PropagateException<T>([NotNull] TaskCompletionSource<T> tcs,
375375
}
376376
else if (e is AggregateException)
377377
{
378-
tcs.TrySetException((e as AggregateException).Flatten().InnerExceptions);
378+
tcs.TrySetException(((AggregateException) e).Flatten().InnerExceptions);
379379
}
380380
else
381381
{

FoundationDB.Client/Encoders/FdbEncoderSubspace`1.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ DISCLAIMED. IN NO EVENT SHALL <COPYRIGHT HOLDER> BE LIABLE FOR ANY
2828

2929
namespace FoundationDB.Client
3030
{
31-
using FoundationDB.Client.Utils;
3231
using FoundationDB.Layers.Tuples;
3332
using JetBrains.Annotations;
3433
using System;

0 commit comments

Comments
 (0)