nac3core/standalone: use default for ComposerConfig
This commit is contained in:
parent
5f24d63b0b
commit
cbf83bcc8c
|
@ -14,6 +14,15 @@ pub struct ComposerConfig {
|
||||||
pub kernel_invariant_ann: &'static str,
|
pub kernel_invariant_ann: &'static str,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Default for ComposerConfig {
|
||||||
|
fn default() -> Self {
|
||||||
|
ComposerConfig {
|
||||||
|
kernel_ann: None,
|
||||||
|
kernel_invariant_ann: "Invariant"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
type DefAst = (Arc<RwLock<TopLevelDef>>, Option<ast::Stmt<()>>);
|
type DefAst = (Arc<RwLock<TopLevelDef>>, Option<ast::Stmt<()>>);
|
||||||
pub struct TopLevelComposer {
|
pub struct TopLevelComposer {
|
||||||
// list of top level definitions, same as top level context
|
// list of top level definitions, same as top level context
|
||||||
|
@ -35,10 +44,7 @@ pub struct TopLevelComposer {
|
||||||
|
|
||||||
impl Default for TopLevelComposer {
|
impl Default for TopLevelComposer {
|
||||||
fn default() -> Self {
|
fn default() -> Self {
|
||||||
Self::new(vec![], ComposerConfig {
|
Self::new(vec![], Default::default()).0
|
||||||
kernel_ann: None,
|
|
||||||
kernel_invariant_ann: "Invariant"
|
|
||||||
}).0
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -46,7 +46,7 @@ fn main() {
|
||||||
let primitive: PrimitiveStore = TopLevelComposer::make_primitives().0;
|
let primitive: PrimitiveStore = TopLevelComposer::make_primitives().0;
|
||||||
let (mut composer, builtins_def, builtins_ty) = TopLevelComposer::new(
|
let (mut composer, builtins_def, builtins_ty) = TopLevelComposer::new(
|
||||||
vec![],
|
vec![],
|
||||||
ComposerConfig { kernel_ann: None, kernel_invariant_ann: "Invariant" }
|
Default::default()
|
||||||
);
|
);
|
||||||
|
|
||||||
let internal_resolver: Arc<ResolverInternal> = ResolverInternal {
|
let internal_resolver: Arc<ResolverInternal> = ResolverInternal {
|
||||||
|
|
Loading…
Reference in New Issue