-
Notifications
You must be signed in to change notification settings - Fork 10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ran cargo fmt
+ added some .context()
calls for non-obvious errors
#56
Conversation
Oh nice! I see we already have a |
hmmm noo I don't think so... it'd have to be in ~/rustfmt.toml right? |
ahh but now the imports didn't change back |
@tombh all right I think it's ready for review |
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.
Thank you! Just a few little nits and then I think we're ready to merge.
crates/cargo-gpu/src/build.rs
Outdated
@@ -7,7 +7,6 @@ use std::io::Write as _; | |||
|
|||
use crate::{install::Install, target_spec_dir}; | |||
use spirv_builder_cli::{args::BuildArgs, Linkage, ShaderModule}; | |||
|
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.
Was this removed by auto formatting?
crates/cargo-gpu/src/install.rs
Outdated
@@ -1,4 +1,5 @@ | |||
//! Install a dedicated per-shader crate that has the `rust-gpu` compiler in it. | |||
//! |
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.
This should be a blank line, instead of a blank comment.
crates/cargo-gpu/src/install.rs
Outdated
let mut file = std::fs::File::create(&path) | ||
.with_context(|| format!("creating file at [{}]", path.display()))?; | ||
file.write_all(contents.as_bytes()) | ||
.context("writring to file")?; |
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.
Little typo here.
crates/cargo-gpu/src/install.rs
Outdated
.context("getting command output") | ||
.and_then(|output| { | ||
log::trace!("STDOUT:\n{}", String::from_utf8_lossy(&output.stdout)); | ||
log::trace!("STDERR:\n{}", String::from_utf8_lossy(&output.stderr)); |
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.
These lines shouldn't be necessary, since the command inherits stdin and stdout, right? Maybe I'm missing something though.
Thanks @Niedzwiedzw - just waiting for the CI checks and then I'll merge 👍 . |
No description provided.