Skip to content

Commit

Permalink
minor code cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jstedfast committed Aug 26, 2024
1 parent 48eadad commit cd8ac20
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 7 deletions.
4 changes: 2 additions & 2 deletions MimeKit/AsyncMimeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,7 @@ async Task ConstructMessagePartAsync (MessagePart rfc822, MimeEntityEndEventArgs
async Task MultipartScanPreambleAsync (Multipart multipart, CancellationToken cancellationToken)
{
using (var memory = new MemoryStream ()) {
long offset = GetOffset (inputIndex);
//long offset = GetOffset (inputIndex);

//OnMultipartPreambleBegin (multipart, offset);
await ScanContentAsync (memory, false, cancellationToken).ConfigureAwait (false);
Expand All @@ -375,7 +375,7 @@ async Task MultipartScanPreambleAsync (Multipart multipart, CancellationToken ca
async Task MultipartScanEpilogueAsync (Multipart multipart, CancellationToken cancellationToken)
{
using (var memory = new MemoryStream ()) {
long offset = GetOffset (inputIndex);
//long offset = GetOffset (inputIndex);

//OnMultipartEpilogueBegin (multipart, offset);
var result = await ScanContentAsync (memory, true, cancellationToken).ConfigureAwait (false);
Expand Down
4 changes: 2 additions & 2 deletions MimeKit/MimeParser.cs
Original file line number Diff line number Diff line change
Expand Up @@ -1551,7 +1551,7 @@ unsafe void ConstructMessagePart (MessagePart rfc822, MimeEntityEndEventArgs arg
unsafe void MultipartScanPreamble (Multipart multipart, byte* inbuf, CancellationToken cancellationToken)
{
using (var memory = new MemoryStream ()) {
long offset = GetOffset (inputIndex);
//long offset = GetOffset (inputIndex);

//OnMultipartPreambleBegin (multipart, offset);
ScanContent (inbuf, memory, false, cancellationToken);
Expand All @@ -1563,7 +1563,7 @@ unsafe void MultipartScanPreamble (Multipart multipart, byte* inbuf, Cancellatio
unsafe void MultipartScanEpilogue (Multipart multipart, byte* inbuf, CancellationToken cancellationToken)
{
using (var memory = new MemoryStream ()) {
long offset = GetOffset (inputIndex);
//long offset = GetOffset (inputIndex);

//OnMultipartEpilogueBegin (multipart, offset);
var result = ScanContent (inbuf, memory, true, cancellationToken);
Expand Down
2 changes: 0 additions & 2 deletions MimeKit/Utils/ParseUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,6 @@ public static bool SkipComment (byte[] text, ref int index, int endIndex)
depth++;
else if (text[index] == (byte) ')')
depth--;
escaped = false;
} else {
escaped = false;
}
Expand All @@ -165,7 +164,6 @@ public static bool SkipComment (string text, ref int index, int endIndex)
depth++;
else if (text[index] == ')')
depth--;
escaped = false;
} else {
escaped = false;
}
Expand Down
2 changes: 1 addition & 1 deletion MimeKit/Utils/StringBuilderExtensions.cs
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ public static void Append (this StringBuilder text, ReadOnlySpan<char> value)

public static void Append (this StringBuilder sb, StringBuilder value)
{
sb.Append (value.ToString ());
sb.Append (value);
}
#endif

Expand Down

0 comments on commit cd8ac20

Please sign in to comment.