feat(rust): upgrade to Rust 1.78.0

This commit is contained in:
Harsh Shandilya 2024-05-25 01:10:28 +05:30
parent 31fc360c02
commit fc7ae8340a
4 changed files with 4 additions and 4 deletions

View file

@ -42,7 +42,7 @@
rustStable = (import fenix {inherit pkgs;}).fromToolchainFile {
file = ./rust-toolchain.toml;
sha256 = "sha256-7QfkHty6hSrgNM0fspycYkRcB82eEqYa4CoAJ9qA3tU=";
sha256 = "sha256-opUgs6ckUQCyDxcB9Wy51pqhd0MPGHUVbwRKKPGiwZU=";
};
craneLib = (crane.mkLib pkgs).overrideToolchain rustStable;

View file

@ -1,5 +1,5 @@
[toolchain]
channel = "1.77.2"
channel = "1.78.0"
components = ["clippy", "rustfmt", "rust-src"]
targets = ["x86_64-unknown-linux-gnu"]
profile = "minimal"

View file

@ -4,7 +4,7 @@ use copypasta::{ClipboardContext, ClipboardProvider};
use std::time::Duration;
use tracing::{debug, error};
pub fn monitor(config: Replacements) -> Result<()> {
pub fn monitor(config: &Replacements) -> Result<()> {
loop {
let mut clipboard =
ClipboardContext::new().expect("Failed to get clipboard");

View file

@ -25,7 +25,7 @@ fn main() -> Result<()> {
std::fs::read_to_string(config_path.as_path()).unwrap_or_default();
let config: Replacements = toml::from_str(&config_str)?;
config.validate()?;
monitor(config)
monitor(&config)
}
fn check_for_version_arg() -> bool {