-
Notifications
You must be signed in to change notification settings - Fork 46
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wow, thanks for the PR!
src/wasi.rs
Outdated
pub fn data_local_dir() -> Option<PathBuf> { None } | ||
pub fn runtime_dir() -> Option<PathBuf> { None } | ||
pub fn executable_dir() -> Option<PathBuf> { None } | ||
pub fn audio_dir() -> Option<PathBuf> { home_dir().map(|h| h.join("Music")) } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you also use None
for these?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, sure. I just thought these to be sensible defaults though, of course not the case if the final API actually included specific support for such personal and interactive uses.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They all end up as None
, because home_dir
returns None
. So writing None
cuts to the chase. :-)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I sometimes do things like this at work, since multiple people get to work on different parts of the same workflow, if someone finished their part the dataflow would automatically connect.
It's correct to assume nothing before platform stabilization, though.
Hmm, squashed and fixed a typo. AppVeyor is so slow... |
Thank you, @xen0n! |
As discussed in #19, make everything return
None
on WASI. Also acargo fmt
run is done.