cargo clippy + fmt fixes

fogti
Sep 24, 2021, 11:04 PM
ZLXYE6PVKPKYEKFI2Q7TZACOX42MLA2KZIS5VCP3DNCNS5M55UXQC

Dependencies

  • [2] VHLGEBT7 packlist: less normalization to support proper roundtrips (which only truncate trailing spaces)
  • [3] BUI22CYQ +zhed-packlist
  • [4] V4EAN7NN move some stuff around; more packlist stuff

Change contents

  • edit in crates/zhed-packlist/src/lib.rs at line 4
    [2.5273][2.5273:5301]()
    clippy::as_conversions,
  • edit in crates/zhed-core/src/valuemodel.rs at line 1
    [3.6594]
    [3.6595]
    use crate::Ident;
    use serde::{Deserialize, Serialize};
  • edit in crates/zhed-core/src/valuemodel.rs at line 4
    [3.6626][3.6626:6663]()
    use serde::{Deserialize, Serialize};
  • edit in crates/zhed-core/src/valuemodel.rs at line 5
    [3.6679][3.6679:6697]()
    use crate::Ident;
  • replacement in crates/zhed-core/src/valuemodel.rs at line 77
    [3.8517][3.8517:8624]()
    self.unbound_vars.get(id).map(|i| i.as_str()).ok_or_else(|| Error::UnboundVarNotFound(id.clone()))
    [3.8517]
    [3.8624]
    self.unbound_vars
    .get(id)
    .map(|i| i.as_str())
    .ok_or_else(|| Error::UnboundVarNotFound(*id))
  • replacement in crates/zhed-core/src/valuemodel.rs at line 87
    [3.8748][3.8748:8821]()
    use std::panic::{catch_unwind, AssertUnwindSafe, resume_unwind};
    [3.8748]
    [3.8821]
    use std::panic::{catch_unwind, resume_unwind, AssertUnwindSafe};
  • replacement in crates/zhed-core/src/valuemodel.rs at line 102
    [3.9279][3.9279:9294]()
    },
    [3.9279]
    [3.9294]
    }
  • replacement in crates/zhed-core/src/valuemodel.rs at line 108
    [3.9422][3.9422:9541]()
    self.bound_vars.get(self.bound_vars.len() - 1 - id).map(|i| i.as_str()).ok_or_else(|| Error::BoundVarNotFound)
    [3.9422]
    [3.9541]
    self.bound_vars
    .get(self.bound_vars.len() - 1 - id)
    .map(|i| i.as_str())
    .ok_or(Error::BoundVarNotFound)