This commit is contained in:
serzhiio committed 2024-01-15 17:28:00 +04:00
1 parent c1fbf31a27
commit a92d1a9424
2 files changed
+7 -10

No files matched your search

+2 -2
View File
@@ -20,7 +20,7 @@ pub enum FormValue {
}
impl Into<Vec<String>> for FormValue {
fn into(self) -> Vec<String> {
match self{
match self {
FormValue::Text(s) => vec![s],
FormValue::VecText(vec) => vec,
}
@@ -29,7 +29,7 @@ impl Into<Vec<String>> for FormValue {
impl FormValue {
/// Convenient way to represent Value as slice
pub fn as_slice(&self) -> &[String] {
match self{
match self {
FormValue::Text(s) => std::slice::from_ref(s),
FormValue::VecText(vec) => vec.as_slice(),
}