Merge pull request #144 from storytold/fix/issue-87-rust-version
Fix #87: rust-version 1.95 and clippy 1.95
This commit is contained in:
commit
088ffc844b
|
|
@ -7,7 +7,7 @@ default-members = ["crates/*", "apps/vectorcraft", "apps/vectorcraft-cli", "xtas
|
|||
version = "0.3.0"
|
||||
edition = "2024"
|
||||
license = "MIT OR Apache-2.0"
|
||||
rust-version = "1.90"
|
||||
rust-version = "1.95"
|
||||
repository = "https://github.com/storytold/vectorcraft"
|
||||
|
||||
[workspace.dependencies]
|
||||
|
|
|
|||
|
|
@ -757,11 +757,7 @@ fn clean_up(s: &mut Session, p: &Value) -> Result<Value> {
|
|||
visit(c, true, false, false, v, opts);
|
||||
}
|
||||
}
|
||||
NodeKind::Text(t) => {
|
||||
if empty_text && t.plain_text().trim().is_empty() {
|
||||
v.push(n.id);
|
||||
}
|
||||
}
|
||||
NodeKind::Text(t) if empty_text && t.plain_text().trim().is_empty() => v.push(n.id),
|
||||
NodeKind::Layer { children, .. } => {
|
||||
for c in children {
|
||||
visit(c, false, false, false, v, opts);
|
||||
|
|
|
|||
|
|
@ -97,7 +97,9 @@ fn sync(app: &VectorcraftApp, d: &mut Dialog) {
|
|||
let preset = d.str("preset");
|
||||
match d.fields.get(APPLIED).and_then(Value::as_object) {
|
||||
Some(a) if a.get("preset").and_then(Value::as_str) == Some(preset.as_str()) => {
|
||||
if a.iter().any(|(k, v)| k != "preset" && d.fields.get(k) != Some(v)) {
|
||||
// Unchanged fields keep the preset (falling through would apply it again).
|
||||
let edited = a.iter().any(|(k, v)| k != "preset" && d.fields.get(k) != Some(v));
|
||||
if edited {
|
||||
d.fields.insert("preset".into(), json!(""));
|
||||
d.fields.remove(APPLIED);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2383,14 +2383,13 @@ mod tests {
|
|||
fn walk(items: &[Item], bad: &mut Vec<String>) {
|
||||
for it in items {
|
||||
match it {
|
||||
Item::Cmd(_, id, _) => {
|
||||
Item::Cmd(_, id, _)
|
||||
if vectorcraft_engine::find_command(id).is_none()
|
||||
&& !UI_COMMANDS.iter().any(|c| c.0 == *id)
|
||||
&& !id.starts_with("object.path.")
|
||||
&& *id != "type.createOutlines"
|
||||
{
|
||||
bad.push(id.to_string());
|
||||
}
|
||||
&& *id != "type.createOutlines" =>
|
||||
{
|
||||
bad.push(id.to_string());
|
||||
}
|
||||
Item::Sub(_, ch) => walk(ch, bad),
|
||||
_ => {}
|
||||
|
|
|
|||
|
|
@ -177,11 +177,11 @@ pub fn check(crates: &[Crate]) -> Vec<Violation> {
|
|||
match classify(&d.name) {
|
||||
// Unregistered deps are reported on their own entry.
|
||||
None => {}
|
||||
Some(Class::Testkit) => {
|
||||
if d.kind != DepKind::Dev {
|
||||
out.push(Violation::TestkitAsNormalDep { krate: c.name.clone() });
|
||||
}
|
||||
Some(Class::Testkit) if d.kind != DepKind::Dev => {
|
||||
out.push(Violation::TestkitAsNormalDep { krate: c.name.clone() });
|
||||
}
|
||||
// The testkit as a dev-dependency is how tests use it.
|
||||
Some(Class::Testkit) => {}
|
||||
Some(dc) => {
|
||||
let to = dc.layer().unwrap_or(u8::MAX);
|
||||
if to >= layer && !(to == layer && intra_layer_allowed(&c.name, &d.name)) {
|
||||
|
|
|
|||
Loading…
Reference in New Issue