Skip to content

fix stack overflow of tests #4

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
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
4 changes: 2 additions & 2 deletions src/fs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ impl StorageBackend for MemoryBackend {

pub struct WriteBuffer<'file, const SIZE: usize> {
file: &'file Box<dyn StorageBackend>,
buffer: [u8; SIZE],
buffer: Box<[u8; SIZE]>,
len: usize,
file_len: u64,
}
Expand All @@ -315,7 +315,7 @@ impl<'file, const SIZE: usize> WriteBuffer<'file, SIZE> {
pub(crate) fn new(file: &'file Box<dyn StorageBackend>, file_len: u64) -> Self {
Self {
file,
buffer: [0u8; SIZE],
buffer: [0u8; SIZE].into(),
len: 0,
file_len,
}
Expand Down