Fix #15571: fix url enum variant size

This commit is contained in:
Julian Amarilla 2025-04-23 21:28:12 -03:00
parent 07ac77991e
commit f963df2350
2 changed files with 2 additions and 2 deletions

View File

@ -35,7 +35,7 @@ pub enum DataSource {
Ls, Ls,
HtmlThemes, HtmlThemes,
FilePath(PathBuf), FilePath(PathBuf),
Url(Url), Url(Box<Url>),
#[default] #[default]
None, None,
} }

View File

@ -169,7 +169,7 @@ fn command(
let uri = spanned_file.item.clone(); let uri = spanned_file.item.clone();
let data_source = if resource.cloud_options.is_none() { let data_source = if resource.cloud_options.is_none() {
Url::from_str(&uri) Url::from_str(&uri)
.map(DataSource::Url) .map(|url| DataSource::Url(url.into()))
.unwrap_or_else(|_| DataSource::FilePath(uri.into())) .unwrap_or_else(|_| DataSource::FilePath(uri.into()))
} else { } else {
DataSource::FilePath(uri.into()) DataSource::FilePath(uri.into())