drop a lint that only fires on command macro noise
This commit is contained in:
@@ -10,6 +10,10 @@ rust-version = "1.94"
|
|||||||
# lints that catch real defects are enabled, since that group is documented as
|
# lints that catch real defects are enabled, since that group is documented as
|
||||||
# cherry-pick-only and its members contradict each other (absolute_paths vs
|
# cherry-pick-only and its members contradict each other (absolute_paths vs
|
||||||
# unused_qualifications, implicit_return vs semicolon_outside_block).
|
# unused_qualifications, implicit_return vs semicolon_outside_block).
|
||||||
|
#
|
||||||
|
# let_underscore_must_use is deliberately absent: it fires at the `Result<..>`
|
||||||
|
# return type of #[tauri::command] wrappers, where there is no discarded binding
|
||||||
|
# to fix, and no amount of restructuring clears it.
|
||||||
[lints.rust]
|
[lints.rust]
|
||||||
unreachable_pub = "warn"
|
unreachable_pub = "warn"
|
||||||
unused_qualifications = "warn"
|
unused_qualifications = "warn"
|
||||||
@@ -32,7 +36,6 @@ ref_as_ptr = "warn"
|
|||||||
ptr_cast_constness = "warn"
|
ptr_cast_constness = "warn"
|
||||||
as_pointer_underscore = "warn"
|
as_pointer_underscore = "warn"
|
||||||
cast_ptr_alignment = "warn"
|
cast_ptr_alignment = "warn"
|
||||||
let_underscore_must_use = "warn"
|
|
||||||
let_underscore_untyped = "warn"
|
let_underscore_untyped = "warn"
|
||||||
else_if_without_else = "warn"
|
else_if_without_else = "warn"
|
||||||
exit = "warn"
|
exit = "warn"
|
||||||
|
|||||||
+5
-1
@@ -12,7 +12,11 @@ fn main() {
|
|||||||
/// .cso files are emitted empty and capture.rs falls back to runtime
|
/// .cso files are emitted empty and capture.rs falls back to runtime
|
||||||
/// `D3DCompile` (so a clean checkout without the SDK still builds).
|
/// `D3DCompile` (so a clean checkout without the SDK still builds).
|
||||||
fn compile_shaders() {
|
fn compile_shaders() {
|
||||||
let out_dir = PathBuf::from(std::env::var("OUT_DIR").expect("OUT_DIR"));
|
// Cargo always sets OUT_DIR for a build script; if it is missing the build
|
||||||
|
// is broken in a way we cannot paper over, so say so plainly.
|
||||||
|
let out_dir = PathBuf::from(
|
||||||
|
std::env::var("OUT_DIR").expect("OUT_DIR is set by cargo for build scripts"),
|
||||||
|
);
|
||||||
let shader_dir = PathBuf::from("shaders");
|
let shader_dir = PathBuf::from("shaders");
|
||||||
|
|
||||||
let fxc = find_fxc();
|
let fxc = find_fxc();
|
||||||
|
|||||||
@@ -520,7 +520,10 @@ impl GraphicsCaptureApiHandler for CaptureHandler {
|
|||||||
self.pipeline = Some(TonemapPipeline::new(device, self.width, self.height)?);
|
self.pipeline = Some(TonemapPipeline::new(device, self.width, self.height)?);
|
||||||
}
|
}
|
||||||
// process() takes the pipeline by mut ref; inline the Option dance.
|
// process() takes the pipeline by mut ref; inline the Option dance.
|
||||||
let pipeline = self.pipeline.as_mut().expect("just initialized");
|
let pipeline = self
|
||||||
|
.pipeline
|
||||||
|
.as_mut()
|
||||||
|
.ok_or_else(|| anyhow!("tonemap pipeline missing after initialization"))?;
|
||||||
pipeline.process(device, context, src, stdin)?;
|
pipeline.process(device, context, src, stdin)?;
|
||||||
|
|
||||||
self.frame_count.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
self.frame_count.fetch_add(1, std::sync::atomic::Ordering::Relaxed);
|
||||||
|
|||||||
@@ -1945,6 +1945,12 @@ async fn export(app: AppHandle, state: State<'_, AppState>, request: ExportReque
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Process startup: if the exe directory cannot be resolved or config.toml
|
||||||
|
// cannot be created there, there is no degraded mode worth continuing into.
|
||||||
|
#[allow(
|
||||||
|
clippy::expect_used,
|
||||||
|
reason = "fatal startup conditions with no sensible recovery"
|
||||||
|
)]
|
||||||
pub fn run() {
|
pub fn run() {
|
||||||
let app_dir = exe_dir().expect("resolve exe directory");
|
let app_dir = exe_dir().expect("resolve exe directory");
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user