Skip to content

Commit

Permalink
Update InnerVerifier_Stream.cs
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonCropp committed Sep 27, 2022
1 parent 113de1d commit 710e82e
Showing 1 changed file with 5 additions and 11 deletions.
16 changes: 5 additions & 11 deletions src/Verify/Verifier/InnerVerifier_Stream.cs
Original file line number Diff line number Diff line change
Expand Up @@ -83,26 +83,20 @@ public async Task<VerifyResult> VerifyStream(Stream? stream, string extension)
convertedTargets);
}

var targets = await GetTargets(stream, extension);
var target = await GetTargets(stream, extension);

return await VerifyInner(null, null, targets);
return await VerifyInner(null, null, new[]{target});
}
}

static async Task<List<Target>> GetTargets(Stream stream, string extension)
static async Task<Target> GetTargets(Stream stream, string extension)
{
if (EmptyFiles.Extensions.IsText(extension))
{
return new()
{
new(extension, await stream.ReadString())
};
return new(extension, await stream.ReadString());
}

return new()
{
new(extension, stream)
};
return new(extension, stream);
}

async Task<(List<object> infos, List<Target> targets, List<Func<Task>> cleanups)> DoExtensionConversion(string extension, Stream stream)
Expand Down

0 comments on commit 710e82e

Please sign in to comment.