mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-04-02 05:23:14 +00:00
@@ -122,7 +122,8 @@ impl<'a> std::ops::DerefMut for ExtendedCommand<'a> {
|
||||
}
|
||||
|
||||
impl<'a> Invoke<'a> for tokio::process::Command {
|
||||
type Extended<'ext> = ExtendedCommand<'ext>
|
||||
type Extended<'ext>
|
||||
= ExtendedCommand<'ext>
|
||||
where
|
||||
Self: 'ext,
|
||||
'ext: 'a;
|
||||
@@ -162,7 +163,8 @@ impl<'a> Invoke<'a> for tokio::process::Command {
|
||||
}
|
||||
|
||||
impl<'a> Invoke<'a> for ExtendedCommand<'a> {
|
||||
type Extended<'ext> = &'ext mut ExtendedCommand<'ext>
|
||||
type Extended<'ext>
|
||||
= &'ext mut ExtendedCommand<'ext>
|
||||
where
|
||||
Self: 'ext,
|
||||
'ext: 'a;
|
||||
@@ -663,8 +665,8 @@ impl FromStr for PathOrUrl {
|
||||
type Err = <PathBuf as FromStr>::Err;
|
||||
fn from_str(s: &str) -> Result<Self, Self::Err> {
|
||||
if let Ok(url) = s.parse::<Url>() {
|
||||
if url.scheme() == "file" {
|
||||
Ok(Self::Path(url.path().parse()?))
|
||||
if let Some(path) = s.strip_prefix("file://") {
|
||||
Ok(Self::Path(path.parse()?))
|
||||
} else {
|
||||
Ok(Self::Url(url))
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user