Skip to content

Commit

Permalink
Revert unnecessary changes
Browse files Browse the repository at this point in the history
  • Loading branch information
kaneeldias committed May 26, 2023
1 parent 98161d4 commit 76ecdba
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 3 deletions.
3 changes: 1 addition & 2 deletions ballerina/stream_types.bal
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,6 @@ public class PersistInMemoryStream {
return <persist:Error>self.err;
} else if self.anydataStream is stream<record {}, error?> {
var anydataStream = <stream<record {}, error?>>self.anydataStream;
checkpanic anydataStream.close();
var streamValue = anydataStream.next();
if streamValue is () {
return streamValue;
Expand Down Expand Up @@ -77,7 +76,7 @@ public class PersistInMemoryStream {

public isolated function close() returns persist:Error? {
if self.anydataStream is stream<anydata, error?> {
error? e = (<stream>self.anydataStream).close();
error? e = (<stream<anydata, error?>>self.anydataStream).close();
if e is error {
return <persist:Error>error(e.message());
}
Expand Down
1 change: 0 additions & 1 deletion ballerina/tests/in-memory-associations-tests.bal
Original file line number Diff line number Diff line change
Expand Up @@ -248,7 +248,6 @@ function inMemoryBuildingRelationsTest() returns error? {
InMemoryRainierClient rainierClient = check new ();

stream<BuildingInfo, error?> buildingStream = rainierClient->/buildings.get();
check buildingStream.close();
BuildingInfo[] buildings = check from BuildingInfo building in buildingStream
select building;

Expand Down

0 comments on commit 76ecdba

Please sign in to comment.