mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2025-08-31 10:17:21 +00:00
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:
parent
67edac4aca
commit
3d4e3a74e5
51 changed files with 140 additions and 158 deletions
|
@ -85,7 +85,7 @@ fn set_random_seed(seed: f64) {
|
|||
#[tauri::command]
|
||||
fn handle_message(message: String) -> String {
|
||||
let Ok(message) = ron::from_str::<graphite_editor::messages::message::Message>(&message) else {
|
||||
panic!("Error parsing message: {}", message)
|
||||
panic!("Error parsing message: {message}")
|
||||
};
|
||||
let responses = EDITOR.with(|editor| {
|
||||
let mut editor = editor.borrow_mut();
|
||||
|
@ -103,7 +103,7 @@ fn handle_message(message: String) -> String {
|
|||
let path = image.path.clone();
|
||||
let mime = image.mime.clone();
|
||||
let transform = image.transform;
|
||||
images.insert(format!("{:?}_{}", &image.path, document_id), image);
|
||||
images.insert(format!("{:?}_{}", image.path, document_id), image);
|
||||
stub_data.push(FrontendImageData {
|
||||
path,
|
||||
node_id: None,
|
||||
|
@ -121,7 +121,7 @@ fn handle_message(message: String) -> String {
|
|||
for response in &responses {
|
||||
let serialized = ron::to_string(&send_frontend_message_to_js(response.clone())).unwrap();
|
||||
if let Err(error) = ron::from_str::<FrontendMessage>(&serialized) {
|
||||
log::error!("Error deserializing message: {}", error);
|
||||
log::error!("Error deserializing message: {error}");
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue