Closed bryevdv closed 11 months ago
This is not going to work because we don't know how we're being called, or if the arguments are even being supplied on the command line. If we want to do this, we'll need to augment the DataSource
interface to add a new trait method like:
fn get_source_path(&self) -> Option<PathBuf>;
Except I'm still not sure I'm happy with this because it might be a URL, not a Path
at all. Maybe, to keep things consistent, we should just make this a String
:
fn get_source_locator(&self) -> Option<String>;
And accept that the conversion into String
will be lossy (i.e., not every Path
can be converted to String
because some OSes use non-UTF8 paths).
👍 That will be much cleaner
This PR adds support to attempt to extract a common path prefix for log files provided on the command line, to use for the window title. If a common prefix is not determinable, the default "Legion Prof" is retained. cc @lightsighter
This PR also applies some some fixes advised by clippy regarding
or_default
.cc @elliottslaughter is there a more robust rust solution for pruning command line options than this?
Usage
Invoked with
produces: