switch to upstream petgraph 0.8.1 #32

Merged
programmerjake merged 11 commits from programmerjake/fayalite:switch-to-upstream-petgraph into master 2025-04-10 04:10:16 +00:00
Showing only changes of commit 122c08d3cf - Show all commits

View file

@ -258,7 +258,7 @@ pub struct VerilogArgs {
default_value = "firtool", default_value = "firtool",
env = "FIRTOOL", env = "FIRTOOL",
value_hint = ValueHint::CommandName, value_hint = ValueHint::CommandName,
value_parser = OsStringValueParser::new().try_map(which::which) value_parser = OsStringValueParser::new().try_map(which)
)] )]
pub firtool: PathBuf, pub firtool: PathBuf,
#[arg(long)] #[arg(long)]
@ -428,6 +428,13 @@ impl clap::Args for FormalAdjustArgs {
} }
} }
fn which(v: std::ffi::OsString) -> which::Result<PathBuf> {
#[cfg(not(miri))]
return which::which(v);
#[cfg(miri)]
return Ok(Path::new("/").join(v));
}
#[derive(Parser, Clone)] #[derive(Parser, Clone)]
#[non_exhaustive] #[non_exhaustive]
pub struct FormalArgs { pub struct FormalArgs {
@ -438,7 +445,7 @@ pub struct FormalArgs {
default_value = "sby", default_value = "sby",
env = "SBY", env = "SBY",
value_hint = ValueHint::CommandName, value_hint = ValueHint::CommandName,
value_parser = OsStringValueParser::new().try_map(which::which) value_parser = OsStringValueParser::new().try_map(which)
)] )]
pub sby: PathBuf, pub sby: PathBuf,
#[arg(long)] #[arg(long)]