Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion compio-io/src/read/ext.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@ pub trait AsyncReadAtExt: AsyncReadAt {

/// Read all bytes as [`String`] until EOF in this source, placing them into
/// `buffer`.
async fn read_to_string_at(&mut self, buf: String, pos: u64) -> BufResult<usize, String> {
async fn read_to_string_at(&self, buf: String, pos: u64) -> BufResult<usize, String> {
let BufResult(res, buf) = self.read_to_end_at(buf.into_bytes(), pos).await;
after_read_to_string(res, buf)
}
Expand Down
2 changes: 1 addition & 1 deletion compio-io/tests/io.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,7 +461,7 @@ fn read_to_string_at() {
block_on(async {
let mut src = vec![1, 1];
src.extend_from_slice("test".as_bytes());
let mut src = ReadOneAt(src);
let src = ReadOneAt(src);

let (len, buf) = src.read_to_string_at(String::new(), 2).await.unwrap();
assert_eq!(len, 4);
Expand Down