mirror of
https://github.com/nushell/nushell.git
synced 2025-05-29 14:21:45 +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,
|
Ls,
|
||||||
HtmlThemes,
|
HtmlThemes,
|
||||||
FilePath(PathBuf),
|
FilePath(PathBuf),
|
||||||
Url(Url),
|
Url(Box<Url>),
|
||||||
#[default]
|
#[default]
|
||||||
None,
|
None,
|
||||||
}
|
}
|
||||||
|
@ -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())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user