Skip to content

Commit

Permalink
Fix lints (#874)
Browse files Browse the repository at this point in the history
  • Loading branch information
adamchalmers authored Sep 5, 2024
1 parent 2ef870a commit f94f8ab
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 8 deletions.
3 changes: 2 additions & 1 deletion .github/workflows/cargo-clippy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,5 +50,6 @@ jobs:
required-permission: write
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- uses: taiki-e/install-action@just
- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings
run: just lint
2 changes: 2 additions & 0 deletions justfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
lint:
cargo clippy --all-features --all-targets -- -D warnings
6 changes: 1 addition & 5 deletions src/cmd_auth.rs
Original file line number Diff line number Diff line change
Expand Up @@ -162,11 +162,7 @@ impl crate::cmd::Command for CmdAuthLogin {
if token.is_empty() {
// We don't want to capture the error here just in case we have no host config
// for this specific host yet.
let existing_token = if let Ok(existing_token) = ctx.config.get(host, "token") {
existing_token
} else {
String::new()
};
let existing_token = ctx.config.get(host, "token").unwrap_or_default();
if !existing_token.is_empty() && interactive {
match dialoguer::Confirm::new()
.with_prompt(format!(
Expand Down
2 changes: 1 addition & 1 deletion src/cmd_kcl.rs
Original file line number Diff line number Diff line change
Expand Up @@ -388,7 +388,7 @@ impl crate::cmd::Command for CmdKclView {

// Create a temporary file to write the snapshot to.
let mut tmp_file = std::env::temp_dir();
tmp_file.push(&format!("zoo-kcl-view-{}.png", uuid::Uuid::new_v4()));
tmp_file.push(format!("zoo-kcl-view-{}.png", uuid::Uuid::new_v4()));

// Spin up websockets and do the conversion.
// This will not return until there are files.
Expand Down
2 changes: 1 addition & 1 deletion src/cmd_ml/cmd_text_to_cad.rs
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ impl crate::cmd::Command for CmdTextToCadView {

// Create a temporary file to write the snapshot to.
let mut tmp_file = std::env::temp_dir();
tmp_file.push(&format!("zoo-text-to-cad-view-{}.png", uuid::Uuid::new_v4()));
tmp_file.push(format!("zoo-text-to-cad-view-{}.png", uuid::Uuid::new_v4()));

let image_bytes = get_image_bytes(ctx, &gltf_bytes, kittycad::types::ImageFormat::Png).await?;

Expand Down

0 comments on commit f94f8ab

Please sign in to comment.