A few minor lints and docs (#1436)

* A few minor lints and docs

* Added required packages to compile on Debian-style linux
* Inlined some format args, and removed some `&` in args (they cause about 6% slowdown that compiler cannot inline)
* a few spelling mistakes

* fix fmt
This commit is contained in:
Yuri Astrakhan
2023-10-18 23:33:10 -07:00
committed by GitHub
parent 67edac4aca
commit 3d4e3a74e5
51 changed files with 140 additions and 158 deletions
+1 -1
View File
@@ -878,7 +878,7 @@ impl Document {
Some([vec![DocumentChanged], update_thumbnails_upstream(&path)].concat())
}
Operation::SetLayerBlobUrl { layer_path, blob_url, resolution: _ } => {
let layer = self.layer_mut(&layer_path).unwrap_or_else(|_| panic!("Blob URL for invalid layer with path '{:?}'", layer_path));
let layer = self.layer_mut(&layer_path).unwrap_or_else(|_| panic!("Blob URL for invalid layer with path '{layer_path:?}'"));
let LayerDataType::Layer(layer) = &mut layer.data else {
panic!("Incorrectly trying to set the image blob URL for a layer that is not a 'Layer' layer type");
+1 -1
View File
@@ -302,7 +302,7 @@ impl LayerNodeIdentifier {
pub fn new(node_id: NodeId, network: &NodeNetwork) -> Self {
debug_assert!(
is_layer_node(node_id, network),
"Layer identifer constructed from non layer node {node_id}: {:#?}",
"Layer identifier constructed from non layer node {node_id}: {:#?}",
network.nodes.get(&node_id)
);
Self::new_unchecked(node_id)
+1 -1
View File
@@ -1044,7 +1044,7 @@ mod tests {
// TODO: 3 real root case
// for root in roots {
// if let Some(num) = root {
// print!("{:.32}", num);
// print!("{num:.32}");
// }
// }
}