Minor warning fixes
This commit is contained in:
parent
3a57cbbba2
commit
831a53e3b4
@ -8,7 +8,7 @@ authors = ["Garen Tyler <garentyler@garen.dev>"]
|
|||||||
repository = "https://github.com/garentyler/composition"
|
repository = "https://github.com/garentyler/composition"
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
edition = "2021"
|
edition = "2024"
|
||||||
|
|
||||||
[workspace.dependencies]
|
[workspace.dependencies]
|
||||||
anyhow = "1.0.71"
|
anyhow = "1.0.71"
|
||||||
|
2
LICENSE
2
LICENSE
@ -1,6 +1,6 @@
|
|||||||
MIT License
|
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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to deal
|
of this software and associated documentation files (the "Software"), to deal
|
||||||
|
@ -122,7 +122,7 @@ impl Config {
|
|||||||
#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
fn write(&self, path: &Path) {
|
fn write(&self, path: &Path) {
|
||||||
trace!("Config.write()");
|
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
|
if file
|
||||||
.write_all(toml::to_string(&self).unwrap().as_bytes())
|
.write_all(toml::to_string(&self).unwrap().as_bytes())
|
||||||
.is_ok()
|
.is_ok()
|
||||||
@ -136,7 +136,7 @@ impl Config {
|
|||||||
#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
fn write_server_icon(&self, path: &Path) {
|
fn write_server_icon(&self, path: &Path) {
|
||||||
trace!("Config.write_server_icon()");
|
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() {
|
if file.write_all(&self.server_icon_bytes).is_ok() {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -147,7 +147,7 @@ macro_rules! packet {
|
|||||||
}
|
}
|
||||||
impl composition_parsing::parsable::Parsable for $packet_type {
|
impl composition_parsing::parsable::Parsable for $packet_type {
|
||||||
#[tracing::instrument]
|
#[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)
|
$parse_body(data)
|
||||||
}
|
}
|
||||||
#[tracing::instrument]
|
#[tracing::instrument]
|
||||||
|
Loading…
x
Reference in New Issue
Block a user