Skip to content

Commit

Permalink
Minor improvements (apache#25136)
Browse files Browse the repository at this point in the history
  • Loading branch information
alexeyinkin committed Jan 27, 2023
1 parent 6e5f8de commit 9096e40
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,9 @@ class CodeRunner extends ChangeNotifier {
if (parsedPipelineOptions == null) {
_setResult(
RunCodeResult(
errorMessage: kPipelineOptionsParseError,
sdk: sdk,
status: RunCodeStatus.compileError,
errorMessage: kPipelineOptionsParseError,
),
);
_runStopDate = DateTime.now();
Expand Down Expand Up @@ -130,9 +130,9 @@ class CodeRunner extends ChangeNotifier {

_setResult(
RunCodeResult(
output: _result!.output,
sdk: _result!.sdk,
status: _result!.status,
output: _result!.output,
),
);

Expand All @@ -155,11 +155,11 @@ class CodeRunner extends ChangeNotifier {

_setResult(
RunCodeResult(
graph: _result?.graph,
log: (_result?.log ?? '') + kExecutionCancelledText,
output: _result?.output,
sdk: sdk,
status: RunCodeStatus.finished,
output: _result?.output,
log: (_result?.log ?? '') + kExecutionCancelledText,
graph: _result?.graph,
),
);

Expand All @@ -184,11 +184,11 @@ class CodeRunner extends ChangeNotifier {
final String logs = selectedExample.logs ?? '';
_setResult(
RunCodeResult(
graph: selectedExample.graph,
log: kCachedResultsLog + logs,
output: selectedExample.outputs,
sdk: selectedExample.sdk,
status: RunCodeStatus.finished,
output: selectedExample.outputs,
log: kCachedResultsLog + logs,
graph: selectedExample.graph,
),
);

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
* limitations under the License.
*/

/// Keys to track the unread status for.
enum UnreadEntryEnum {
result,
graph,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,6 @@ class _OrFinder extends ChainedFinder {

@override
Iterable<Element> filter(Iterable<Element> parentCandidates) {
final result = parentCandidates.toSet();
result.addAll(another.evaluate());
return result;
return {...parentCandidates, ...another.evaluate()};
}
}

0 comments on commit 9096e40

Please sign in to comment.