Minor warning fixes

This commit is contained in:
Garen Tyler 2024-12-03 20:40:07 -07:00
parent 3a57cbbba2
commit 831a53e3b4
Signed by: garentyler
SSH Key Fingerprint: SHA256:G4ke7blZMdpWPbkescyZ7IQYE4JAtwpI85YoJdq+S7U
4 changed files with 5 additions and 5 deletions

View File

@ -8,7 +8,7 @@ authors = ["Garen Tyler <garentyler@garen.dev>"]
repository = "https://github.com/garentyler/composition"
readme = "README.md"
license = "MIT"
edition = "2021"
edition = "2024"
[workspace.dependencies]
anyhow = "1.0.71"

View File

@ -1,6 +1,6 @@
MIT License
Copyright (c) 2020-2023 Garen Tyler
Copyright (c) 2020-2024 Garen Tyler
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal

View File

@ -122,7 +122,7 @@ impl Config {
#[tracing::instrument]
fn write(&self, path: &Path) {
trace!("Config.write()");
if let Ok(mut file) = File::options().write(true).create(true).open(path) {
if let Ok(mut file) = File::options().write(true).create(true).truncate(true).open(path) {
if file
.write_all(toml::to_string(&self).unwrap().as_bytes())
.is_ok()
@ -136,7 +136,7 @@ impl Config {
#[tracing::instrument]
fn write_server_icon(&self, path: &Path) {
trace!("Config.write_server_icon()");
if let Ok(mut file) = File::options().write(true).create(true).open(path) {
if let Ok(mut file) = File::options().write(true).create(true).truncate(true).open(path) {
if file.write_all(&self.server_icon_bytes).is_ok() {
return;
}

View File

@ -147,7 +147,7 @@ macro_rules! packet {
}
impl composition_parsing::parsable::Parsable for $packet_type {
#[tracing::instrument]
fn parse<'data>(data: &'data [u8]) -> composition_parsing::ParseResult<'_, Self> {
fn parse<'data>(data: &'data [u8]) -> composition_parsing::ParseResult<'data, Self> {
$parse_body(data)
}
#[tracing::instrument]