Skip to content

Commit

Permalink
refactor code to match
Browse files Browse the repository at this point in the history
  • Loading branch information
kevaundray committed Dec 17, 2023
1 parent e24738b commit 97a8162
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion compiler/noirc_driver/src/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ pub(crate) fn filter_relevant_files(
let mut file_map = BTreeMap::new();

for file_id in files_with_debug_symbols {
let file_source = file_manager.fetch_file(file_id).source();
let file_source = file_manager.fetch_file(file_id);

file_map.insert(
file_id,
Expand Down
4 changes: 2 additions & 2 deletions compiler/noirc_frontend/src/hir/def_map/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -270,8 +270,8 @@ pub struct Contract {

/// Given a FileId, fetch the File, from the FileManager and parse it's content
pub fn parse_file(fm: &FileManager, file_id: FileId) -> (ParsedModule, Vec<ParserError>) {
let file = fm.fetch_file(file_id);
parse_program(file.source())
let file_source = fm.fetch_file(file_id);
parse_program(file_source)
}

impl std::ops::Index<LocalModuleId> for CrateDefMap {
Expand Down
2 changes: 1 addition & 1 deletion tooling/nargo/src/artifacts/debug.rs
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ impl DebugArtifact {
.collect();

for file_id in files_with_debug_symbols {
let file_source = file_manager.fetch_file(file_id).source();
let file_source = file_manager.fetch_file(file_id);

file_map.insert(
file_id,
Expand Down
2 changes: 1 addition & 1 deletion tooling/nargo_cli/src/cli/fmt_cmd.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ pub(crate) fn run(args: FormatCommand, config: NargoConfig) -> Result<(), CliErr
return Ok(());
}

let original = file_manager.fetch_file(file_id).source();
let original = file_manager.fetch_file(file_id);
let formatted = nargo_fmt::format(original, parsed_module, &config);

if check_mode {
Expand Down

0 comments on commit 97a8162

Please sign in to comment.