mirror of
https://github.com/GraphiteEditor/Graphite.git
synced 2026-09-22 06:08:11 +08:00
Fix a lot of Clippy warnings (#1808)
* fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * bump msrv to 1.70.0 to silence warnings * fix a lot of clippy warnings * fix more clippy warnings * fix yet more clippy warnings * fix a few more warnings * fix a clippy warning * remove a commented out line * silense too many arguments error * fix more clippy warnings * prefix underscore to unused vars/functions to fix warnings * use filter instead of map * move raw-rs-tests feature flat to module level to fix unused imports warnings * fix a couple of unused result warnings --------- Co-authored-by: Keavon Chambers <keavon@keavon.com>
This commit is contained in:
co-authored by
Keavon Chambers
parent
f7ada701e5
commit
62f73df048
@@ -17,7 +17,7 @@ use std::cell::RefCell;
|
||||
// use std::sync::Mutex;
|
||||
|
||||
thread_local! {
|
||||
static EDITOR: RefCell<Option<Editor>> = RefCell::new(None);
|
||||
static EDITOR: RefCell<Option<Editor>> = const { RefCell::new(None) };
|
||||
}
|
||||
|
||||
// async fn respond_to(id: Path<String>) -> impl IntoResponse {
|
||||
|
||||
@@ -731,9 +731,9 @@ impl EditorHandle {
|
||||
return;
|
||||
}
|
||||
|
||||
let transform = get_current_transform(&inputs);
|
||||
let transform = get_current_transform(inputs);
|
||||
let upstream_transform = metadata.upstream_transform(node_id);
|
||||
let pivot_transform = glam::DAffine2::from_translation(upstream_transform.transform_point2(bounds.local_pivot(get_current_normalized_pivot(&inputs))));
|
||||
let pivot_transform = glam::DAffine2::from_translation(upstream_transform.transform_point2(bounds.local_pivot(get_current_normalized_pivot(inputs))));
|
||||
|
||||
update_transform(inputs, pivot_transform * transform * pivot_transform.inverse());
|
||||
});
|
||||
@@ -894,7 +894,7 @@ fn editor<T: Default>(callback: impl FnOnce(&mut editor::application::Editor) ->
|
||||
return T::default();
|
||||
};
|
||||
|
||||
callback(&mut *editor)
|
||||
callback(&mut editor)
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
@@ -18,8 +18,8 @@ use wasm_bindgen::prelude::*;
|
||||
pub static EDITOR_HAS_CRASHED: AtomicBool = AtomicBool::new(false);
|
||||
pub static LOGGER: WasmLog = WasmLog;
|
||||
thread_local! {
|
||||
pub static EDITOR: OnceCell<RefCell<editor::application::Editor>> = OnceCell::new();
|
||||
pub static EDITOR_HANDLE: OnceCell<RefCell<editor_api::EditorHandle>> = OnceCell::new();
|
||||
pub static EDITOR: OnceCell<RefCell<editor::application::Editor>> = const { OnceCell::new() };
|
||||
pub static EDITOR_HANDLE: OnceCell<RefCell<editor_api::EditorHandle>> = const { OnceCell::new() };
|
||||
}
|
||||
|
||||
/// Initialize the backend
|
||||
@@ -48,9 +48,9 @@ pub fn panic_hook(info: &panic::PanicInfo) {
|
||||
});
|
||||
}
|
||||
|
||||
/// The JavaScript `Error` type
|
||||
#[wasm_bindgen]
|
||||
extern "C" {
|
||||
/// The JavaScript `Error` type
|
||||
#[derive(Clone, Debug)]
|
||||
pub type Error;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user