mirror of
https://github.com/nushell/nushell.git
synced 2025-05-28 14:07:08 +02:00
Fix #15571: fix url enum variant size
This commit is contained in:
parent
07ac77991e
commit
f963df2350
@ -35,7 +35,7 @@ pub enum DataSource {
|
||||
Ls,
|
||||
HtmlThemes,
|
||||
FilePath(PathBuf),
|
||||
Url(Url),
|
||||
Url(Box<Url>),
|
||||
#[default]
|
||||
None,
|
||||
}
|
||||
|
@ -169,7 +169,7 @@ fn command(
|
||||
let uri = spanned_file.item.clone();
|
||||
let data_source = if resource.cloud_options.is_none() {
|
||||
Url::from_str(&uri)
|
||||
.map(DataSource::Url)
|
||||
.map(|url| DataSource::Url(url.into()))
|
||||
.unwrap_or_else(|_| DataSource::FilePath(uri.into()))
|
||||
} else {
|
||||
DataSource::FilePath(uri.into())
|
||||
|
Loading…
x
Reference in New Issue
Block a user