build: optimize imports
This commit is contained in:
parent
88f92d51b3
commit
d1497ae711
1 changed files with 6 additions and 6 deletions
12
src/lib.rs
12
src/lib.rs
|
@ -15,7 +15,6 @@
|
||||||
#[macro_use]
|
#[macro_use]
|
||||||
extern crate rust_i18n;
|
extern crate rust_i18n;
|
||||||
|
|
||||||
use eframe::{AppCreator, Renderer, Theme};
|
|
||||||
#[cfg(target_os = "android")]
|
#[cfg(target_os = "android")]
|
||||||
use winit::platform::android::activity::AndroidApp;
|
use winit::platform::android::activity::AndroidApp;
|
||||||
|
|
||||||
|
@ -26,7 +25,7 @@ use crate::node::Node;
|
||||||
|
|
||||||
i18n!("locales");
|
i18n!("locales");
|
||||||
|
|
||||||
pub mod node;
|
mod node;
|
||||||
mod wallet;
|
mod wallet;
|
||||||
pub mod gui;
|
pub mod gui;
|
||||||
|
|
||||||
|
@ -59,7 +58,8 @@ fn android_main(app: AndroidApp) {
|
||||||
start(options, app_creator(PlatformApp::new(platform)));
|
start(options, app_creator(PlatformApp::new(platform)));
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn app_creator<T: 'static>(app: PlatformApp<T>) -> AppCreator where PlatformApp<T>: eframe::App {
|
pub fn app_creator<T: 'static>(app: PlatformApp<T>) -> eframe::AppCreator
|
||||||
|
where PlatformApp<T>: eframe::App {
|
||||||
Box::new(|cc| {
|
Box::new(|cc| {
|
||||||
App::setup_visuals(&cc.egui_ctx);
|
App::setup_visuals(&cc.egui_ctx);
|
||||||
App::setup_fonts(&cc.egui_ctx);
|
App::setup_fonts(&cc.egui_ctx);
|
||||||
|
@ -68,9 +68,9 @@ pub fn app_creator<T: 'static>(app: PlatformApp<T>) -> AppCreator where Platform
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn start(mut options: eframe::NativeOptions, app_creator: AppCreator) {
|
pub fn start(mut options: eframe::NativeOptions, app_creator: eframe::AppCreator) {
|
||||||
options.default_theme = Theme::Light;
|
options.default_theme = eframe::Theme::Light;
|
||||||
options.renderer = Renderer::Wgpu;
|
options.renderer = eframe::Renderer::Wgpu;
|
||||||
|
|
||||||
setup_i18n();
|
setup_i18n();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue