Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: deno_core -> 0.202.0 #20135

Merged
merged 8 commits into from
Aug 12, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Patches from deno_core changes
  • Loading branch information
mmastrac committed Aug 12, 2023
commit b55aba3d0b3fed14b1a9eb6acfedd5cedc95c5ab
2 changes: 1 addition & 1 deletion cli/tests/testdata/node/test.out
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ error: Error: rejected from reject fail
at [WILDCARD]

./node/test.js (uncaught error)
error: Error: rejected from unhandled rejection fail
error: (in promise) Error: rejected from unhandled rejection fail
Promise.reject(new Error("rejected from unhandled rejection fail"));
^
at [WILDCARD]
Expand Down
12 changes: 4 additions & 8 deletions ext/io/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -170,14 +170,10 @@ impl FsStat {
pub trait File {
fn read_sync(self: Rc<Self>, buf: &mut [u8]) -> FsResult<usize>;
async fn read(self: Rc<Self>, limit: usize) -> FsResult<BufView> {
let vec = vec![0; limit];
let buf = BufMutView::from(vec);
let (nread, buf) = self.read_byob(buf).await?;
let mut vec = buf.unwrap_vec();
if vec.len() != nread {
vec.truncate(nread);
}
Ok(BufView::from(vec))
let buf = BufMutView::new(limit);
let (nread, mut buf) = self.read_byob(buf).await?;
buf.truncate(nread);
Ok(buf.into_view())
}
async fn read_byob(
self: Rc<Self>,
Expand Down