clippy: new fixes

This commit is contained in:
Valentin Tolmer
2024-06-16 11:58:00 +02:00
committed by nitnelave
parent 73686224dd
commit 6f46ffd1e4
6 changed files with 22 additions and 25 deletions

View File

@@ -1,4 +1,4 @@
use std::str::FromStr;
use std::{fmt::Display, str::FromStr};
use crate::{
components::{
@@ -24,9 +24,13 @@ struct JsFile {
contents: Option<Vec<u8>>,
}
impl ToString for JsFile {
fn to_string(&self) -> String {
self.file.as_ref().map(File::name).unwrap_or_default()
impl Display for JsFile {
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
write!(
f,
"{}",
self.file.as_ref().map(File::name).unwrap_or_default()
)
}
}

View File

@@ -1,3 +1,5 @@
#![allow(clippy::empty_docs)]
use wasm_bindgen::prelude::*;
#[wasm_bindgen]