chore: prepare 0.1.0 for crates.io publish
Add LICENSE-MIT and LICENSE-APACHE at workspace root and in each member package so the dual MIT OR Apache-2.0 license ships in the published .crate. Fill in publish metadata (authors, repository, homepage, readme, keywords, categories) across the workspace and both members. Add CHANGELOG.md with a 0.1.0 initial release entry. Fix clippy lints: unused enumerate index, collapsible if, Default impls for TimerTable, SimRadio, and Ctx, use RangeInclusive::contains. Exclude examples/microwave_tui.rs from the published package. The file stays in-tree but has known unawaited async log futures that need a dedicated pass before it ships. Apply cargo fmt across the workspace.
This commit is contained in:
23 files changed
+2046
-849
No files matched your search
@@ -176,7 +176,10 @@ fn parse_body(input: ParseStream, is_root: bool) -> syn::Result<StateBody> {
|
||||
let ty: Type = input.parse()?;
|
||||
input.parse::<Token![;]>()?;
|
||||
if !is_root {
|
||||
return Err(syn::Error::new(ident.span(), "`context:` is only valid at root"));
|
||||
return Err(syn::Error::new(
|
||||
ident.span(),
|
||||
"`context:` is only valid at root",
|
||||
));
|
||||
}
|
||||
body.context_ty = Some(ty);
|
||||
}
|
||||
@@ -186,7 +189,10 @@ fn parse_body(input: ParseStream, is_root: bool) -> syn::Result<StateBody> {
|
||||
let ty: Type = input.parse()?;
|
||||
input.parse::<Token![;]>()?;
|
||||
if !is_root {
|
||||
return Err(syn::Error::new(ident.span(), "`events:` is only valid at root"));
|
||||
return Err(syn::Error::new(
|
||||
ident.span(),
|
||||
"`events:` is only valid at root",
|
||||
));
|
||||
}
|
||||
body.event_ty = Some(ty);
|
||||
}
|
||||
@@ -290,10 +296,17 @@ fn parse_body(input: ParseStream, is_root: bool) -> syn::Result<StateBody> {
|
||||
let content;
|
||||
braced!(content in input);
|
||||
let cbody = parse_body(&content, false)?;
|
||||
body.children.push(StateDecl { name: sname.clone(), body: cbody, span: sname.span() });
|
||||
body.children.push(StateDecl {
|
||||
name: sname.clone(),
|
||||
body: cbody,
|
||||
span: sname.span(),
|
||||
});
|
||||
}
|
||||
other => {
|
||||
return Err(syn::Error::new(ident.span(), format!("unknown item `{}` in statechart body", other)));
|
||||
return Err(syn::Error::new(
|
||||
ident.span(),
|
||||
format!("unknown item `{}` in statechart body", other),
|
||||
));
|
||||
}
|
||||
}
|
||||
} else {
|
||||
@@ -423,7 +436,12 @@ fn parse_duration_rest(input: ParseStream, repeat: bool) -> syn::Result<Trigger>
|
||||
}
|
||||
}
|
||||
let key = expr_to_string(&expr);
|
||||
Ok(Trigger::Duration { expr, key, span, repeat })
|
||||
Ok(Trigger::Duration {
|
||||
expr,
|
||||
key,
|
||||
span,
|
||||
repeat,
|
||||
})
|
||||
}
|
||||
|
||||
fn expr_to_string(e: &Expr) -> String {
|
||||
|
||||
Reference in new issue
Block a user