Skip to content

Commit

Permalink
Don't use slurp-rest in the core anymore
Browse files Browse the repository at this point in the history
  • Loading branch information
lizmat committed May 16, 2020
1 parent c1decf2 commit a69465a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions src/core.c/CompUnit/Repository/Installation.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@ sub MAIN(:$name, :$auth, :$ver, *@, *%) {
self!add-short-name($name-path, $dist, $id);
%links{$name-path} = $id;
my $handle = $dist.content($file);
my $content = $handle.open.slurp-rest(:bin,:close);
my $content = $handle.open.slurp(:bin,:close);
$destination.spurt($content);
$handle.close;
}
Expand All @@ -237,7 +237,7 @@ sub MAIN(:$name, :$auth, :$ver, *@, *%) {
my $destination = $resources-dir.add($id);
%links{$name-path} = $id;
my $handle = $dist.content($file);
my $content = $handle.open.slurp-rest(:bin,:close);
my $content = $handle.open.slurp(:bin,:close);
$destination.spurt($content);
$handle.close;
}
Expand Down
4 changes: 2 additions & 2 deletions src/core.c/Distribution.pm6
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ role Distribution {
# `content($content-id)` provides an API to the data itself
# - Use `.meta` to determine the $address of a specific $content-id
# - IO::Handle is meant to be a data stream that may or may not be available; for now
# it would return an IO::Handle and have `.open.slurp-rest(:bin)` called on it. So if
# a socket wants to handle this role currently it would have to wrap `open` or `.slurp-rest`
# it would return an IO::Handle and have `.open(:bin).slurp` called on it. So if
# a socket wants to handle this role currently it would have to wrap `open` or `.slurp`
# to handle any protocol negotiation as well as probably saving the data to a tmpfile and
# return an IO::Handle to that

Expand Down

0 comments on commit a69465a

Please sign in to comment.