Some more clippy fixes, warnings are noisy

This commit is contained in:
2025-03-05 00:57:06 +00:00
parent d53661b9a0
commit 014ec5310c
8 changed files with 34 additions and 19 deletions
+4 -5
View File
@@ -1,3 +1,4 @@
#![allow(dead_code)]
#![feature(proc_macro_span)]
#![warn(
clippy::correctness,
@@ -10,9 +11,6 @@
rustdoc::missing_panics_doc
)]
use std::fs::File;
use std::io::{Read, Seek, SeekFrom};
use proc_macro::{Span, TokenStream};
use quote::quote;
use std::path::PathBuf;
@@ -36,7 +34,8 @@ pub fn include_font(item: TokenStream) -> TokenStream {
let source_filepath: PathBuf = source_file.path();
let file_path = format!(
"{}/{}",
source_filepath.parent().unwrap_or_else(|| panic!("Expected to find the calling source file in a folder like src! Got: {}", source_filepath.display())).display(),
source_filepath.parent()
.unwrap_or_else(|| panic!("Expected to find the calling source file in a folder like src! Got: {}", source_filepath.display())).display(),
filename.value()
);
@@ -124,7 +123,7 @@ impl FontBuilder {
})
}
fn parse_psf2(data: &[u8]) -> Result<FontData, &'static str> {
const fn parse_psf2(_data: &[u8]) -> Result<FontData, &'static str> {
Err("PSF2 support is not implemented yet!")
}
}