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

Add method to get access to a file's source in SimpleReportingFiles #11

Open
Boscop opened this issue Jul 24, 2020 · 0 comments
Open

Add method to get access to a file's source in SimpleReportingFiles #11

Boscop opened this issue Jul 24, 2020 · 0 comments

Comments

@Boscop
Copy link

Boscop commented Jul 24, 2020

After I have gotten the byte index with let str_start = files.byte_index(file_idx, line_nr, 0).unwrap(); I need to know the length of that line, so that I can use it as span length.
Please add a way to get access to a file stored in SimpleReportingFiles, so that I can do
let line_len = files.file(file_idx)[str_start..].position(|c| c == '\n');
to get the line len.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant