Skip to content

Commit

Permalink
ci: try to fix
Browse files Browse the repository at this point in the history
  • Loading branch information
SilenLoc committed Mar 24, 2024
1 parent c6bcf5e commit 7e455e6
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 23 deletions.
10 changes: 5 additions & 5 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ edition = "2021"
# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
egui = "0.23"
egui_plot = "0.23.0"
eframe = { version = "0.23.0", default-features = true, features = [
egui = "0.26"
egui_plot = "0.26"
eframe = { version = "0.26", default-features = true, features = [
"default_fonts", # Embed the default egui fonts.
"glow", # Use the glow rendering backend. Alternative: "wgpu".
"persistence", # Enable restoring app state when restarting the app.
Expand All @@ -18,9 +18,9 @@ serde = { version = "1", features = ["derive"] }
rand = "0.8.5"
random_word = { version = "0.4", features = ["en"] }
catppuccin-egui = { git = "https://github.com/catppuccin/egui.git" }
egui_extras ="0.23.0"
egui_extras ="0.26.0"
egui-notify = { git = "https://github.com/ItsEthra/egui-notify.git" }
egui_dock = "0.8"
egui_dock = "0.11.4"
log = "0.4.20"
getrandom = { version = "0.2", features = ["js"] }
web-time = "0.2.0"
Expand Down
16 changes: 1 addition & 15 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,10 @@ mod typewriter;
fn main() -> eframe::Result<()> {
tracing_subscriber::fmt::init();
let native_options = eframe::NativeOptions {
active: true,
app_id: Some("type".to_owned()),
always_on_top: false,
maximized: false,
decorated: true,
drag_and_drop_support: true,
icon_data: None,
initial_window_pos: Option::from(egui::Pos2::new(300_f32, 100_f32)),
initial_window_size: Option::from(egui::Vec2::new(1000_f32, 1000_f32)),
min_window_size: None,
max_window_size: None,
resizable: true,
transparent: true,
vsync: true,
multisampling: 0,
depth_buffer: 0,
stencil_buffer: 0,
fullscreen: false,
mouse_passthrough: Default::default(),
hardware_acceleration: eframe::HardwareAcceleration::Preferred,
renderer: eframe::Renderer::Glow,
follow_system_theme: Default::default(),
Expand All @@ -41,6 +26,7 @@ fn main() -> eframe::Result<()> {
shader_version: Default::default(),
centered: true,
persist_window: false,
viewport: Default::default(),
};
eframe::run_native(
"TypeFast",
Expand Down
5 changes: 2 additions & 3 deletions src/scoring/wpm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,7 @@ impl WordsPerDuration {
let line = Line::new(score_points);
ui.group(|ui| {
let plot = egui_plot::Plot::new(title)
.auto_bounds_x()
.auto_bounds_y()
.auto_bounds([true, true].into())
.width(400.0)
.height(100.0)
.show_axes([self.show_axes; 2])
Expand Down Expand Up @@ -124,6 +123,6 @@ impl Time {
}
}

fn average(history: &Vec<f64>) -> f64 {
fn average(history: &[f64]) -> f64 {
history.iter().sum::<f64>() / history.len() as f64
}

0 comments on commit 7e455e6

Please sign in to comment.