Resolve more linting issues
This commit is contained in:
parent
7949033857
commit
d878f4e82c
|
@ -137,11 +137,6 @@ impl Input {
|
|||
self
|
||||
}
|
||||
|
||||
pub fn with_value(mut self, val: &str) -> Self {
|
||||
self.value = Some(val.to_owned());
|
||||
self
|
||||
}
|
||||
|
||||
pub fn with_attributes<'a>(
|
||||
mut self,
|
||||
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)]
|
||||
pub struct Button {
|
||||
ty: Option<String>,
|
||||
|
|
|
@ -92,7 +92,7 @@ pub fn thumbnail(info: &FileInfo) -> Container {
|
|||
format!("/{}", *info.id),
|
||||
Container::default()
|
||||
.with_attributes([("class", "thumbnail")])
|
||||
.with_image(&format!("{}/tn", *info.id), "test data")
|
||||
.with_image(format!("{}/tn", *info.id), "test data")
|
||||
.to_html_string(),
|
||||
),
|
||||
)
|
||||
|
|
Loading…
Reference in New Issue