Skip to content

Commit 0c17b7b

Browse files
committed
Nit
1 parent 09446fa commit 0c17b7b

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

examples/src/hir.rs

+4-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
use solar::{
22
interface::{diagnostics::EmittedDiagnostics, Session},
33
sema::{
4-
hir::{Arena, ContractId, Hir},
4+
hir::{Arena, ContractId},
55
ParsingContext,
66
},
77
};
@@ -23,9 +23,9 @@ fn main() -> Result<(), EmittedDiagnostics> {
2323
let mut parsing_context = ParsingContext::new(&sess);
2424
parsing_context.load_files(paths)?;
2525
let hir = parsing_context.parse_and_lower_to_hir(&hir_arena)?;
26-
let counter_contract = Hir::contract(&hir, ContractId::new(0));
26+
let counter_contract = hir.contract(ContractId::new(0));
2727
assert_eq!(counter_contract.name.to_string(), "Counter");
28-
let another_counter_contract = Hir::contract(&hir, ContractId::new(1));
28+
let another_counter_contract = hir.contract(ContractId::new(1));
2929
assert_eq!(another_counter_contract.name.to_string(), "AnotherCounter");
3030
Ok(())
3131
});
@@ -34,3 +34,4 @@ fn main() -> Result<(), EmittedDiagnostics> {
3434
// If any errors were emitted, this returns `Err(_)`, otherwise `Ok(())`.
3535
sess.emitted_errors().unwrap()
3636
}
37+

0 commit comments

Comments
 (0)