Skip to content

Commit d0e3749

Browse files
authored
Update clap (replacing structopt) (#1114)
Fixes the remaining security warning at https://github.com/EmbarkStudios/rust-gpu/security/dependabot
1 parent baab3f6 commit d0e3749

File tree

7 files changed

+118
-124
lines changed

7 files changed

+118
-124
lines changed

Cargo.lock

+96-97
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

examples/runners/ash/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ ash = "0.37"
1818
ash-window = "0.12"
1919
raw-window-handle = "0.5.1"
2020
winit = { version = "0.29.0", features = ["rwh_05"] }
21-
structopt = "0.3.20"
21+
clap = { version = "4", features = ["derive"] }
2222
cfg-if = "1.0.0"
2323
shared = { path = "../../shaders/shared" }
2424
spirv-builder = { workspace = true, default-features = false }

examples/runners/ash/src/main.rs

+5-5
Original file line numberDiff line numberDiff line change
@@ -93,22 +93,22 @@ use std::{
9393
thread,
9494
};
9595

96-
use structopt::StructOpt;
96+
use clap::Parser;
9797

9898
use spirv_builder::{MetadataPrintout, SpirvBuilder};
9999

100100
use shared::ShaderConstants;
101101

102-
#[derive(Debug, StructOpt)]
103-
#[structopt()]
102+
#[derive(Debug, Parser)]
103+
#[command()]
104104
pub struct Options {
105105
/// Use Vulkan debug layer (requires Vulkan SDK installed)
106-
#[structopt(short, long)]
106+
#[arg(short, long)]
107107
debug_layer: bool,
108108
}
109109

110110
pub fn main() {
111-
let options = Options::from_args();
111+
let options = Options::parse();
112112
let shaders = compile_shaders();
113113

114114
// runtime setup

examples/runners/wgpu/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ futures = { version = "0.3", default-features = false, features = ["std", "execu
2323
# Vulkan SDK or MoltenVK needs to be installed for `vulkan-portability` to work on macOS
2424
wgpu = { version = "0.18.0", features = ["spirv", "vulkan-portability"] }
2525
winit = { version = "0.29.0", features = ["android-native-activity", "rwh_05"] }
26-
structopt = "0.3"
26+
clap = { version = "4", features = ["derive"] }
2727
strum = { version = "0.23.0", default_features = false, features = ["std", "derive"] }
2828
bytemuck = "1.6.3"
2929

0 commit comments

Comments
 (0)