Resolve more linting issues

This commit is contained in:
Savanni D'Gerinel 2023-10-26 00:19:13 -04:00
parent 7949033857
commit d878f4e82c
2 changed files with 1 additions and 31 deletions

View File

@ -137,11 +137,6 @@ impl Input {
self self
} }
pub fn with_value(mut self, val: &str) -> Self {
self.value = Some(val.to_owned());
self
}
pub fn with_attributes<'a>( pub fn with_attributes<'a>(
mut self, mut self,
values: impl IntoIterator<Item = (&'a str, &'a str)>, values: impl IntoIterator<Item = (&'a str, &'a str)>,
@ -156,31 +151,6 @@ impl Input {
} }
} }
#[derive(Clone, Debug)]
pub struct Label {
target: String,
text: String,
}
impl Label {
pub fn new(target: &str, text: &str) -> Self {
Self {
target: target.to_owned(),
text: text.to_owned(),
}
}
}
impl Html for Label {
fn to_html_string(&self) -> String {
format!(
"<label for=\"{target}\">{text}</label>",
target = self.target,
text = self.text
)
}
}
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub struct Button { pub struct Button {
ty: Option<String>, ty: Option<String>,

View File

@ -92,7 +92,7 @@ pub fn thumbnail(info: &FileInfo) -> Container {
format!("/{}", *info.id), format!("/{}", *info.id),
Container::default() Container::default()
.with_attributes([("class", "thumbnail")]) .with_attributes([("class", "thumbnail")])
.with_image(&format!("{}/tn", *info.id), "test data") .with_image(format!("{}/tn", *info.id), "test data")
.to_html_string(), .to_html_string(),
), ),
) )