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: fetch_file now returns &str instead of a File #3846

Merged
merged 2 commits into from
Dec 18, 2023

Conversation

kevaundray
Copy link
Contributor

Description

This makes the API more uniform because to add a file, we call:

    pub fn add_file_with_source(&mut self, file_name: &Path, source: String) -> Option<FileId> {

and now to fetch a file we call:

    pub fn fetch_file(&self, file_id: FileId) -> &str;

Instead of returning a File which was not present when we were adding a File

Problem*

Resolves

Summary*

Additional Context

Documentation*

Check one:

  • No documentation needed.
  • Documentation included in this PR.
  • [Exceptional Case] Documentation to be submitted in a separate PR.

PR Checklist*

  • I have tested the changes locally.
  • I have formatted the changes with Prettier and/or cargo fmt on default settings.

@kevaundray kevaundray added this pull request to the merge queue Dec 18, 2023
Merged via the queue into master with commit 13d70ce Dec 18, 2023
30 checks passed
@kevaundray kevaundray deleted the kw/fetch-file-src branch December 18, 2023 16:20
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

Successfully merging this pull request may close these issues.

2 participants