diff --git a/Cargo.toml b/Cargo.toml index 91bd982..58f4091 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,5 +1,3 @@ -cargo-features = ["profile-rustflags"] - [package] name = "itop" description = "top program, made in iced" @@ -13,25 +11,8 @@ sysinfo = "0.39.6" [dependencies.iced] version = "0.14.0" -features = ["canvas", "smol"] - -[profile.debug] -debug = true -strip = "none" -debug-assertions = true -overflow-checks = true - -[profile.dev] -opt-level = 3 -rustflags = ["-Clink-arg=-fuse-ld=mold"] - -debug = false -strip = "debuginfo" -debug-assertions = false -overflow-checks = false +features = [ "canvas", "smol" ] [profile.release] -panic = "abort" -codegen-units = 1 lto = true -strip = "symbols" +codegen-units = 1 diff --git a/flake.lock b/flake.lock index 1481218..70c7363 100644 --- a/flake.lock +++ b/flake.lock @@ -2,11 +2,11 @@ "nodes": { "crane": { "locked": { - "lastModified": 1793836618, - "narHash": "sha256-TREenflwEjxOSq292FYwbc3kEm7TDRtXCZRNWEdjBmg=", + "lastModified": 1790899423, + "narHash": "sha256-THGtz65UGJU+sonZidRboyCMk+9DclpMF7pwL4uDV4M=", "owner": "ipetkov", "repo": "crane", - "rev": "79fd63528501446749c09f08cad486a58c7d173e", + "rev": "47b6b27ed9a3a9181415e4367d0c30ab2a0e0250", "type": "github" }, "original": { @@ -20,11 +20,11 @@ "systems": "systems" }, "locked": { - "lastModified": 1791914995, - "narHash": "sha256-Zf/xfQEAasnwnmEfHqW/4hjDE/s44yn2hD4RuVIZRjA=", + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", "owner": "numtide", "repo": "flake-utils", - "rev": "b7a79d3fea1e214f6d668d521cecec0c01e26544", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", "type": "github" }, "original": { @@ -35,11 +35,11 @@ }, "nixpkgs": { "locked": { - "lastModified": 1794042290, - "narHash": "sha256-VZ8WvA9m3XN36juXyg/GwbDRU2OezOHJlXpJCXkccv0=", - "rev": "f4a03c008967841f2a0b3cb7c436fc6fc31671f6", + "lastModified": 1791260994, + "narHash": "sha256-MFBjw66d4h06MvpW6lIl7RwarLteD0sk859CncGwb1Q=", + "rev": "151fa4e8ddfdd8dd25d945ad94ed54a13de9f6e4", "type": "tarball", - "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1113206.f4a03c008967/nixexprs.tar.zst?lastModified=1794042290&rev=f4a03c008967841f2a0b3cb7c436fc6fc31671f6" + "url": "https://releases.nixos.org/nixos/unstable/nixos-26.11pre1086391.151fa4e8ddfd/nixexprs.tar.zst?lastModified=1791260994&rev=151fa4e8ddfdd8dd25d945ad94ed54a13de9f6e4" }, "original": { "type": "tarball", diff --git a/flake.nix b/flake.nix index e17d2c2..1c9efff 100644 --- a/flake.nix +++ b/flake.nix @@ -104,10 +104,7 @@ LD_LIBRARY_PATH = lib.makeLibraryPath dlDeps; inputsFrom = [ crate ]; - packages = with pkgs; [ - rust-analyzer - mold - ]; + packages = [ pkgs.rust-analyzer ]; }; } ); diff --git a/src/app/graph.rs b/src/app/graph.rs index 79a96b7..8a3796a 100644 --- a/src/app/graph.rs +++ b/src/app/graph.rs @@ -35,7 +35,7 @@ impl canvas::Program for Graph { frame.stroke( &canvas::Path::new(|builder| { for (index, value) in self.timeline.iter().enumerate() { - let x = index as f32 / (self.timeline.len() - 1) as f32 * bounds.width; + let x = index as f32 / self.timeline.len() as f32 * bounds.width; let y = bounds.height - value / 100. * bounds.height; builder.line_to(Point::new(x, y)) }