Skip to content

Commit 3b60bf9

Browse files
committed
print possible values only once
1 parent f4a4ffb commit 3b60bf9

File tree

1 file changed

+2
-11
lines changed
  • examples/runners/wgpu/src

1 file changed

+2
-11
lines changed

examples/runners/wgpu/src/lib.rs

Lines changed: 2 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -90,16 +90,6 @@ pub enum RustGPUShader {
9090
Mouse,
9191
}
9292

93-
impl RustGPUShader {
94-
pub fn help_string() -> String {
95-
let variants: Vec<String> = Self::value_variants()
96-
.iter()
97-
.map(|v| v.to_possible_value().unwrap().get_name().to_owned())
98-
.collect();
99-
format!("Shader to run [{}]", variants.join(", "))
100-
}
101-
}
102-
10393
struct CompiledShaderModules {
10494
named_spv_modules: Vec<(Option<String>, wgpu::ShaderModuleDescriptorSpirV<'static>)>,
10595
}
@@ -235,7 +225,8 @@ fn maybe_watch(
235225
#[derive(Parser, Clone)]
236226
#[command()]
237227
pub struct Options {
238-
#[arg(short, long, default_value = "Sky", help = RustGPUShader::help_string())]
228+
/// which shader to run
229+
#[arg(short, long, default_value = "sky")]
239230
shader: RustGPUShader,
240231

241232
#[arg(long)]

0 commit comments

Comments
 (0)